webpack 4.0以上配置报错
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/concepts/mode/
在 pack.json 里面配置好
"dev": "webpack --mode development",
"build": "webpack --mode production",
配置好后,运行npm run server 还是报错
需要在 webpack.confige.json 里面再配置一下
mode:"development",