webpack.config.js配置文件报错:The ‘mode‘ option has not been set
webpack.config.js配置文件报错:The 'mode' option has not been set
·
报错
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value.
Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
解决:
在package.json文件里进行修改:增加如下:
scripts": {
"dev": "webpack-dev-server --mode development",
"build": "webpack --mode development"
更多推荐
已为社区贡献1条内容
所有评论(0)