求大神指点
这个是报错的地方
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.module has an unknown property 'loaders'. These properties are valid:
object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, defaultRules?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }
-> Options affecting the normal modules (NormalModuleFactory
).
我的代码config.js是
module.exports = {
devtool: "source-map",
entry: __dirname + "/app/main.js",
output:{
path: __dirname + "/public/",
filename:"bundle.js"
},
devServer:{
contentBase:"./public",
port:"9000",
inline:true,
historyApiFallback:true
},
module: {
loaders: [{
test: /\.json$/,
loader: "json"
}, {
test: /\.js$/,
exclude: /node_modules/,
loader: "babel",
query: {
presets: ['es2015', 'react']
}
}]
}
}
module应该是rule吧