我已经升级到 Babel 6 并试图让它与 react-hot-loader 一起工作,在 webpack.config 文件中,我有这个:
loaders: [{
test: /\.js$/,
loaders: ['react-hot', 'babel'],
include: path.join(__dirname, 'app'),
query: {
presets: ['react', 'es2015', 'stage-0']
}
}
上面的配置给出了这个错误:
Cannot define 'query' and multiple loaders in loaders list"
Webpack 可能会混淆查询是 forreact-hot-loader
还是babel
.
我该如何解决这个问题?