教程参考这里:https://www.w3cschool.cn/webpackguide/webpackguide-cue52777.html
总结一下遇到的问题:
1.这样的警告(The 'mode' option has not been set, webpack will fallback to 'production' for this value)
解决方案:
在webpack.config.js配置中添加 mode:'production'
参考官网:https://webpack.js.org/concepts/mode/
2.报错显示这样(configuration.module has an unknown property 'loaders')
解决方案:
将webpack.config.js中的“loaders”修改为"rules"(应该是版本升级后的变化)