0

I have begin receive an error from webpack after update from webpack 3 to webpack 4 version -

WARNING in configuration The 'mode' option has not been set. Set 'mode' option to 'development' or 'production' to enable defaults for this environment.

My current config is looks like below. What's I makes wrong?

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 || '')
}
Max Travis
  • 1,228
  • 4
  • 18
  • 41

0 Answers0