title: Vue variable undefined only when compiled using 'npm run prod'
body: <p>Using 2.6.14 and ant-design-vue. The following bunch of code works ok if compiled using laravel's 'npm run development' but it doesn't work if compiled using 'npm run production', as this.$message is undefined. Does it make any sense? Why would a variable change its value because of that?</p>
  <pre><code>axios
   .post(url, formData)
    .then((r) =&gt; {
        console.log(this.$message);
        this.$message.success(&quot;Noticia guardada correctamente&quot;);
         this.$router.push({ name: &quot;index&quot; });
    })
    .catch((e) =&gt; {
        console.log(this.$message)
        this.$message.error(&quot;Error al guardar la noticia&quot;);
     })
    .finally(() =&gt; {
        this.saving = false;
     });
  </code></pre>
  <p>My scripts at package.json:</p>
  <pre><code>&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 --config=node_modules/laravel-mix/setup/webpack.config.js&quot;
      },
  </code></pre>
  <p>My webpack.mix.js:</p>
  <pre><code>const mix = require('laravel-mix');
  
  /*
   |--------------------------------------------------------------------------
   | Mix Asset Management
   |--------------------------------------------------------------------------
   |
   | Mix provides a clean, fluent API for defining some Webpack build steps
   | for your Laravel applications. By default, we are compiling the CSS
   | file for the application as well as bundling up all the JS files.
   |
   */
  
  mix.js('resources/js/app.js', 'public/js')
      .postCss('resources/css/app.css', 'public/css', [
          //
      ]);
  mix.js('resources/js/front/app.js', 'public/js/front');
  
  mix.js(
      &quot;resources/js/components/admin/pages/news/index.js&quot;,
      &quot;public/back/news/js/news.js&quot;
  );
  </code></pre>