1.想通过图表分析webpack打包出来的代码,搜索了下可以通过webpack --profile --json > stats.json产生webpack统计信息
然后通过官方的地址
上传stats文件分析。
但是在控制台使用webpack --profile --json > stats.json提示
webpack --profile --json > stats.json
No configuration file found and no output filename configured via CLI option.
A configuration file could be named 'webpack.config.js' in the current directory.
Use --help to display the CLI options.
我用的是vue-cli里面的webpack模版,里面配置webpack.base.conf.js、webpack.dev.conf.js、webpack.prod.conf.js并没有webpack.config.js怎么破
webpack.prod.conf.js或webpack.base.conf.js中的plugins数组中加入如下代码: