Text webpack error report about loaders error

ask for advice
this is where the error is reported

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 ).

my code config.js is

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



}
Mar.02,2021

module should be rule

Menu