在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ 文本webpack報(bào)錯(cuò)關(guān)于loaders的報(bào)錯(cuò)

文本webpack報(bào)錯(cuò)關(guān)于loaders的報(bào)錯(cuò)

求大神指點(diǎn)
這個(gè)是報(bào)錯(cuò)的地方

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']
            }
        }]
    }



}
回答
編輯回答
清夢(mèng)

module應(yīng)該是rule吧

2017年5月16日 17:24