WebPack 2:node.global和resolve.extensions空扩展配置字段问题

时间:2016-11-17 11:33:01

标签: webpack

我根据旧的2.1.0-beta.22 webpack配置文件收到此消息。根据如何改变这一点,我需要som esuggestions:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.node.global should be a boolean.
 - configuration.resolve.extensions[0] should not be empty.

目前:

resolve: {

  extensions: ['', '.ts', '.js', '.json'],
  modules: [helpers.root('src'), 'node_modules'],

},

并且

node: {
  global: 'window',
}

这些是我的配置文件:

1 个答案:

答案 0 :(得分:0)

尝试使用'*'代替''

long long

它适用于rc.7 - details here