Answer the question
In order to leave comments, you need to log in
The app.js file weighs 735kb - is it normal?
NPM says that app.js is 735kb, and says it's a lot. And now I look and understand that it's a bit too much, but maybe I'm wrong. So the question is: app.js weighs 735kb - is it normal?
UPD #1
to get at least something filled in stats.json and then start the server:
>>> npx webpack --profile --json --entry ./resources/js/app.js --output-path ./public/js/app.js > stats.json
>>> npx webpack-bundle-analyzer ./stats.json -h 0.0.0.0
Answer the question
In order to leave comments, you need to log in
See via https://www.npmjs.com/package/webpack-bundle-analyzer
Usage (as a CLI utility)
You can analyze an existing bundle if you have a webpack stats JSON file.
You can generate it using BundleAnalyzerPlugin with generateStatsFile option set to true or with this simple command:
webpack --profile --json > stats.json
If you're on Windows and using PowerShell, you can generate the stats file with this command to avoid BOM issues:
webpack --profile --json | Out-file 'stats.json' -Encoding OEM
webpack-bundle-analyzer bundle/output/path/stats.json
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question