Skip to content

Commit 35ef912

Browse files
committed
feat : add option to just generate a file. not a server.
1 parent 8cc01fe commit 35ef912

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webpack.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const config = require('./webpack.settings')
22
const BrowserSyncPlugin = require('browser-sync-webpack-plugin')
3-
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
3+
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
44
const CopyWebpackPlugin = require('copy-webpack-plugin')
55
const ManifestPlugin = require('webpack-manifest-plugin')
66
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
@@ -184,7 +184,10 @@ module.exports = (env, argv) => {
184184

185185
if (argv.mode === 'production') {
186186
webpackConfig.optimization.minimizer = [
187-
// new BundleAnalyzerPlugin(),
187+
new BundleAnalyzerPlugin({
188+
analyzerMode: 'static',
189+
openAnalyzer: false,
190+
}),
188191
new OptimizeCssAssetsPlugin({
189192
assetNameRegExp: /\.min\.css$/,
190193
cssProcessorOptions: {

0 commit comments

Comments
 (0)