Skip to content

Commit b64a63b

Browse files
committed
Remove BundleAnalyzerPlugin when production
1 parent 52584ab commit b64a63b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

webpack.config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ module.exports = env => {
3434
chrome: "70"
3535
}
3636
if (ENABLE_IE_SUPPORT) {targets.ie = "10";}
37+
// Plugins
38+
let plugins = [];
39+
if (mode == "development") {
40+
plugins.push(new BundleAnalyzerPlugin());
41+
}
3742
// Optimization
3843
const optimization = {
3944
minimize: true,
@@ -57,9 +62,7 @@ module.exports = env => {
5762
path: path.resolve(__dirname, "dist/"),
5863
filename: "[name].js"
5964
},
60-
plugins: [
61-
new BundleAnalyzerPlugin()
62-
],
65+
plugins,
6366
optimization: mode === "production" ? optimization : undefined,
6467
resolve: { extensions: [".wasm", ".mjs", ".ts", ".js", ".json"] },
6568
module: {

0 commit comments

Comments
 (0)