webpack-bundle-analyzer
Webpack visualization plug-in is used to check the total number of packages, the volume of each package and the situation inside the package
start viewing
npm run build --report
The result was an error npm ERR! Missing script: build
, and then I found that the scripts
the parameter in package.json was
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"build:prod": "cross-env NODE_ENV=production env_config=prod node build/build.js",
"build:sit": "cross-env NODE_ENV=production env_config=sit node build/build.js",
"lint": "eslint --ext .js,.vue src",
"test": "npm run lint"
},
So the right order should be
npm run build:prod --report
Visiting address: http://localhost:8888/
Similar Posts:
- npm ERR! missing script: build
- [Solved] Possible reasons why NPM run build cannot package NPM err! missing script: build
- npm ERR! missing script: dev [How to Solve]
- Vue Project: npm run dev :missing script:dev [How to Solve]
- npm ERR! missing script: dev [How to Solve]
- Vue configures the compression-webpack-plugin to package and compress JS and CSS Error
- Webpack packaging error: cannot find module ‘webpack / bin / config yargs’ error reason, [email protected] Step on the pit~
- WebPack Task Runner
- [Solved] IView NPM run dev run error: TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
- Cannot findmodule’webpack-cli/bin/config-yargs