Skip to content

Commit 0ce341d

Browse files
committed
Fixes #2048 restored a single bundle for the web
1 parent aae54fd commit 0ce341d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

webpack.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const ImageMinimizerPlugin = require('image-minimizer-webpack-plugin');
1818
const JSON5 = require('json5');
1919
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
2020
const TerserPlugin = require('terser-webpack-plugin');
21-
const { WebpackError } = require('webpack');
21+
const { WebpackError, webpack, optimize } = require('webpack');
2222
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
2323

2424
module.exports =
@@ -81,6 +81,10 @@ function getExtensionConfig(target, mode, env) {
8181
}),
8282
];
8383

84+
if (target === 'webworker') {
85+
plugins.push(new optimize.LimitChunkCountPlugin({ maxChunks: 1 }));
86+
}
87+
8488
if (env.analyzeDeps) {
8589
plugins.push(
8690
new CircularDependencyPlugin({

0 commit comments

Comments
 (0)