Answer the question
In order to leave comments, you need to log in
How to script npx webpack --profile --json=compilation-stats.json?
Hello, if with webpack-cli installed yarn add webpack-cli --dev
use
npx webpack --profile --json=compilation-stats.json
you get a json-chip that can be analyzed for speed https://webpack.github.io/analyse///package.json
"scripts": {
"profile": "npx webpack --profile --json=compilation-stats.json",
}
"profile": "webpack --profile --json=compilation-stats.json",
same error yarn profile
yarn run v1.22.17
warning ..\package.json: No license field
$ cross-env NODE_ENV=production webpack --profile --json=profile/profile.txt
[webpack-cli] stats are successfully stored as json to profile/profile.txt
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
- the file is created, analyzed and everything works, but why does it write in the console that something is wrong, although everything seems to be normal ...
Answer the question
In order to leave comments, you need to log in
If you have webpack as a dependency, you don't need to use npx in the scripts section command.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question