webpack打包时出现下面的报错
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/
原因:没有设置webpack的模式,是生产还是开发(production or development)
解决方法
webpack --mode=development
博客指出Webpack打包时出现报错,原因是未设置Webpack的模式,即未明确是生产还是开发环境。给出的解决方法是使用命令“webpack --mode=development”来设置模式,还可参考相关链接了解更多。
903

被折叠的 条评论
为什么被折叠?



