Skip to content

Commit

Permalink
Fixes #2048 restored a single bundle for the web
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Jul 13, 2022
1 parent aae54fd commit 0ce341d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webpack.config.js
Expand Up @@ -18,7 +18,7 @@ const ImageMinimizerPlugin = require('image-minimizer-webpack-plugin');
const JSON5 = require('json5');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const { WebpackError } = require('webpack');
const { WebpackError, webpack, optimize } = require('webpack');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

module.exports =
Expand Down Expand Up @@ -81,6 +81,10 @@ function getExtensionConfig(target, mode, env) {
}),
];

if (target === 'webworker') {
plugins.push(new optimize.LimitChunkCountPlugin({ maxChunks: 1 }));
}

if (env.analyzeDeps) {
plugins.push(
new CircularDependencyPlugin({
Expand Down

0 comments on commit 0ce341d

Please sign in to comment.