title: JavaScript heap out of memory when building Vue.js app
body: <p>I'm trying to build a vue.js app for production. This error message always appears midway through.</p>
  
  <pre><code>FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
  </code></pre>
  
  <p>I already tried to increase the memory by adding <code>--max_old_space_size=4096</code> and even tried to change it to 8192, but to no avail. I am using a Mac with 8 GB of RAM so I'm not sure why this is happening.</p>
  
  <p>This is the code I run for <em>npm run build</em>:</p>
  
  <pre><code>vue-cli-service build --max_old_space_size=4096
  </code></pre>