1. WARNING in configuration
    2. 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.
    3. You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/

    解决方法
    这个warning一般出现在webpack打包的时候,出现这个问题的原因是在启动webpack的时候没有定义环境,我们只需要在webpack命令后面加上 —mode即可。

    webpack --mode <环境变量>

    或者在webpack.config.js文件中添加mode属性即可

    module.exports = {
        mode : 'development'   // development为开发者环境,production为生产环境变量 ,还有一个为none
    }