Fixed analyzer
This commit is contained in:
@@ -109,6 +109,7 @@ public/*.js
|
||||
public/*.css
|
||||
public/*.map
|
||||
public/*.gz
|
||||
public/*.txt
|
||||
|
||||
letsencrypt/
|
||||
mysql/
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
"dev": "concurrently npm:watch:server npm:watch:client",
|
||||
"watch:server": "nodemon ./* --ext js,jsx,json --ignore 'node_modules/*'",
|
||||
"watch:client": "webpack serve --env=development --config webpack.config.js",
|
||||
"analyzer": "webpack --env=production --analyzer --config webpack.config.js"
|
||||
"analyze": "webpack --env=production --env=analyze --config webpack.config.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
+2
-3
@@ -9,8 +9,7 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
const path = require('path');
|
||||
|
||||
//the exported config function
|
||||
module.exports = ({ production, analyzer }) => {
|
||||
|
||||
module.exports = ({ production, analyze }) => {
|
||||
return {
|
||||
mode: production ? "production" : "development",
|
||||
entry: path.resolve(__dirname, 'client', 'client.jsx'),
|
||||
@@ -80,7 +79,7 @@ module.exports = ({ production, analyzer }) => {
|
||||
minRatio: 0.8
|
||||
}),
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: analyzer ? 'server' : 'disabled'
|
||||
analyzerMode: analyze ? 'server' : 'disabled'
|
||||
})
|
||||
],
|
||||
devServer: {
|
||||
|
||||
Reference in New Issue
Block a user