Skip to content

Commit

Permalink
fix: don't generate report.html file for RC and Production (#3125)
Browse files Browse the repository at this point in the history
  • Loading branch information
mudassir-hafeez authored Sep 12, 2024
1 parent b6d23ab commit 1205de1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ prodConfig.module.rules = [
},
];

const analyzeBundles = process.env.WEBPACK_ANALYZE?.toLowerCase() === "true";

module.exports = Object.assign(prodConfig, {
context: __dirname,
mode: "production",
Expand All @@ -53,9 +55,13 @@ module.exports = Object.assign(prodConfig, {
new MiniCssExtractPlugin({
filename: "[name]-[contenthash].css",
}),
new BundleAnalyzerPlugin({
analyzerMode: "static",
}),
...(analyzeBundles
? [
new BundleAnalyzerPlugin({
analyzerMode: "static",
}),
]
: []),
],
optimization: {
minimize: true,
Expand Down

0 comments on commit 1205de1

Please sign in to comment.