报错
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",文章来源:https://www.toymoban.com/news/detail-806994.html
"build": "webpack --mode development"文章来源地址https://www.toymoban.com/news/detail-806994.html
到了这里,关于webpack.config.js配置文件报错:The ‘mode‘ option has not been set的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!