title: Webpack error: configuration.module.rules[0] has an unknown property 'query'
body: <p>I am following this tutorial: <a href="https://www.youtube.com/watch?v=iWUR04B42Hc" rel="nofollow noreferrer">https://www.youtube.com/watch?v=iWUR04B42Hc</a>, I know it has outdated content but I think a have translated it correctly to the latest version of <em>Webpack</em>, but it's giving me this error <code>configuration.module.rules[0] has an unknown property 'query'.</code></p>
  <p><em>Full version</em></p>
  <pre><code>[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
   - configuration.module.rules[0] has an unknown property 'query'. These properties are valid:
     object { assert?, compiler?, dependency?, descriptionData?, enforce?, exclude?, generator?, include?, issuer?, issuerLayer?, layer?, loader?, mimetype?, oneOf?, options?, parser?, realResource?, resolve?, resource?, resourceFragment?, resourceQuery?, rules?, scheme?, sideEffects?, test?, type?, use? }
     -&gt; A rule description with conditions and effects for modules.
  </code></pre>
  <p><em>My <code>webpack.config.js</code></em>
  const path = require('path');</p>
  <pre><code>module.exports = {
      entry: {
          app: './source/app.js'
      },
      output: {
          path: path.resolve(__dirname, 'build'),
          filename: 'app.bundle.js'
      },
      mode: 'development',
      module: {
          rules: [
              {
                  test: /\.js?$/,
                  exclude: /node_modules/,
                  loader: 'babel-loader',
                  query: {
                      presets: ['@babel/preset-env']
                  }
              }
          ]
      }
  }
  </code></pre>
  <p>Do anyone know what's the problem with my code?</p>