从webpack 3更新到webpack 4版本后,我已经开始从webpack接收错误-
WARNING in configuration
The 'mode' option has not been set. Set 'mode' option to 'development' or 'production' to enable defaults for this environment.
我当前的配置如下所示。我怎么了?
config.globals = {
'process.env': {
NODE_ENV: JSON.stringify(config.env)
},
NODE_ENV: config.env,
__DEV__: config.env === 'development',
__PROD__: config.env === 'production',
__TEST__: config.env === 'test',
__BASENAME__: JSON.stringify(process.env.BASENAME || '')
}