title: How to include minified javascript file in production generated by Laravel Mix?
body: <p>I am using <code>laravel-mix</code>, and this is my <code>webpack.mix.js</code>:</p>
  
  <pre><code>const mix = require('laravel-mix');
  
  mix.version();
  mix.js('resources/js/app.js', 'public/js').extract();
  
  if (mix.inProduction()) {
      mix.minify('public/js/vendor.js');
  }
  </code></pre>
  
  <p>In production I want to use the minified version of <code>vendor.js</code>.</p>
  
  <p>In my blade template:</p>
  
  <pre><code>&lt;script src="{{ mix('js/vendor.js') }}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>In development it works as expected. But in production <code>laravel-mix</code> doesn't include my minified version. The minified version is loaded only if I specify it explicitly:</p>
  
  <pre><code>&lt;script src="{{ mix('js/vendor.min.js') }}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>How to include the correct version of the file without changing templates?</p>