title: Prevent laravel mix from converting "const" and "let" to "var"
body: <p>I am using LaravelMix to compile my project.
  And I want to prevent LaravelMix from converting <code>const</code> and <code>let</code> to <code>var</code></p>
  <p>I tried to update babel to latest version and tried alot of solutions on stackoverflow with no success.</p>
  <p>This is my <code>webpack.mix.js</code></p>
  <pre class="lang-js prettyprint-override"><code>const mix = require(&quot;laravel-mix&quot;);
  
  mix.webpackConfig({
    module: {
      rules: [
        {
          test: /\.m?js$/,
          exclude: /node_modules/,
          use: {
            loader: &quot;babel-loader&quot;,
            options: {
              presets: [
                [
                  &quot;@babel/preset-env&quot;,
                  { targets: &quot;defaults, not ie 11, not ie_mob 11&quot; },
                ],
              ],
              plugins: [&quot;@babel/plugin-proposal-class-properties&quot;],
            },
          },
        },
      ],
    },
  });
  
  mix
    .js(&quot;./app.js&quot;, &quot;./assets/js&quot;)
    .postCss(&quot;./app.css&quot;, &quot;./assets/css&quot;, [
      require(&quot;tailwindcss&quot;),
      require(&quot;autoprefixer&quot;),
    ]);
  </code></pre>
  <p>And this is my <code>package.json</code></p>
  <pre class="lang-json prettyprint-override"><code>{
  ...
  
  &quot;dependencies&quot;: {
      &quot;laravel-mix&quot;: &quot;^6.0.34&quot;,
      &quot;quicklink&quot;: &quot;^2.2.0&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.16.0&quot;,
      &quot;@babel/plugin-proposal-class-properties&quot;: &quot;^7.16.0&quot;,
      &quot;@babel/preset-env&quot;: &quot;^7.16.0&quot;,
      &quot;autoprefixer&quot;: &quot;^10.4.0&quot;,
      &quot;babel-loader&quot;: &quot;^8.2.3&quot;,
      &quot;browser-sync&quot;: &quot;^2.27.5&quot;,
      &quot;browser-sync-webpack-plugin&quot;: &quot;^2.3.0&quot;,
      &quot;postcss&quot;: &quot;^8.3.11&quot;,
      &quot;tailwindcss&quot;: &quot;^2.2.19&quot;,
      &quot;webpack&quot;: &quot;^5.62.1&quot;
    },
    &quot;browserslist&quot;: [
      &quot;defaults, not ie 11, not ie_mob 11&quot;
    ]
  
  ...
  }
  </code></pre>
  <p>Any help?</p>