A novice runs webpack and reports an error: unknown property 'loaders'..

webpack.config.js:
var webpack = require("webpack");
var path = require("path");
module.exports = {
        entry: "./src/app.js",
        output: {
            path: path.resolve(__dirname,"./bin"),
            filename: "app.bundle.js"
        },
        module: {
          loaders: [
             {
               test: /\.js$/,
               exclude: /(node_modules|bower_components)/,
               loader: "babel-loader",
               query: {
                   presets: ["es2015"]
                }
          }
        ]
    }
    

error is reported when executing the webpack command:

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:

I checked that webpack-v is 3.2.0
I replaced the loaders character under module with rules without making a mistake.
I checked on the Internet. It seems that the configuration of webpack1, and webpack2 is different.
I don"t know if my computer is equipped with webpack1 and webpack2,. I have checked that other projects are used by rulse, without loaders,. Is webpack1 not used much, or what?

Feb.28,2021

webpack v2 all use rules


change the loaders in module to rules


this. I also encountered these problems when learning before. Different versions of webpack configuration files are written differently. You can carefully check the version of the project webpack, and then go to the document to find the specific writing method.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1beb696-31a98.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1beb696-31a98.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?