title: webpack-cli Invalid configuration object
body: <p>I have <strong><code>laravel</code> 5.8</strong> installed and I want to use <code>vue</code> in it. I tried running following commands.
  I am running it on ubuntu, node version is 10.19.</p>
  <pre><code>1. npm install
  2. npm run watch
  </code></pre>
  <p>First command runs okay and gave some warnings. When I <code>run npm run watch</code> I get following errors.
  I am kind of new so any help is appreciated.</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[10] has an unknown property 'loaders'. 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.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 2
  npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js &quot;--watch&quot;`
  npm ERR! Exit status 2
  npm ERR!
  npm ERR! Failed at the @ development script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /home/admin/.npm/_logs/2021-12-07T09_49_10_144Z-debug.log
  npm ERR! code ELIFECYCLE
  npm ERR! errno 2
  npm ERR! @ watch: `npm run development -- --watch`
  npm ERR! Exit status 2
  npm ERR!
  npm ERR! Failed at the @ watch script.
  npm ERR! This is probably not a problem with npm.
  </code></pre>
  <p>My package.json is as follows</p>
  <pre><code>{
  &quot;private&quot;: true,
  &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;npm run development&quot;,
      &quot;development&quot;: &quot;cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js&quot;,
      &quot;watch&quot;: &quot;npm run development -- --watch&quot;,
      &quot;watch-poll&quot;: &quot;npm run watch -- --watch-poll&quot;,
      &quot;hot&quot;: &quot;cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js&quot;,
      &quot;prod&quot;: &quot;npm run production&quot;,
      &quot;production&quot;: &quot;cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js&quot;
  },
  &quot;devDependencies&quot;: {
      &quot;axios&quot;: &quot;^0.24.0&quot;,
      &quot;bootstrap&quot;: &quot;^4.1.0&quot;,
      &quot;cross-env&quot;: &quot;^5.1&quot;,
      &quot;jquery&quot;: &quot;^3.2&quot;,
      &quot;laravel-mix&quot;: &quot;^4.1.4&quot;,
      &quot;lodash&quot;: &quot;^4.17.5&quot;,
      &quot;popper.js&quot;: &quot;^1.12&quot;,
      &quot;resolve-url-loader&quot;: &quot;^3.1.0&quot;,
      &quot;sass&quot;: &quot;^1.44.0&quot;,
      &quot;sass-loader&quot;: &quot;^7.3.1&quot;,
      &quot;vue&quot;: &quot;^2.5.17&quot;,
      &quot;vue-template-compiler&quot;: &quot;^2.6.14&quot;,
      &quot;webpack&quot;: &quot;^5.65.0&quot;,
      &quot;webpack-cli&quot;: &quot;^4.9.1&quot;,
      &quot;webpack-dev-server&quot;: &quot;^4.6.0&quot;
  },
  &quot;dependencies&quot;: {}
  </code></pre>
  <p>}</p>