title: In Vue cli, How to use custom mode and build like in production mode?
body: <p>I'm building a Vue app and want to override some env variables while building in one build case, so I created a custom <code>mode</code> and sat a command in <code>package.json</code> like:  </p>
  
  <pre><code>vue-cli-service build --mode myMode --modern
  </code></pre>
  
  <p>And put the env vars I want in the file specified for this mode:  </p>
  
  <pre><code>// file name: .env.myMode
  VUE_APP_MY_VAR=123
  </code></pre>
  
  <p>Now how can I build using the same build steps in <code>production</code> mode but within my custom mode?
  Because when I build using the previous command it doesn't mangle or compress the js files for example.</p>