瀏覽代碼

Fixes #2048 restored a single bundle for the web

main
Eric Amodio 2 年之前
父節點
當前提交
914a2d0817
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. +5
    -1
      webpack.config.js

+ 5
- 1
webpack.config.js 查看文件

@ -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 =
@ -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({

Loading…
取消
儲存