title: monorepo with vue-cli 3 and lerna
body: <p>I'm trying to create a monorepo using vue-cli 3 and lerna. I now have two packages:</p>
  
  <p><code>common</code> and <code>app</code>. Both <code>common</code> and <code>app</code> use <code>Vue</code> and import it. <code>common</code> has its main set like this. <code>"main": "dist/common.umd.min.js"</code></p>
  
  <p>When I import <code>common</code> in <code>app</code>, the process crashes with this error message trying to process <code>common.umd.min.js</code>:</p>
  
  <pre><code>FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
  </code></pre>
  
  <p>Even running with <code>node --max-old-space-size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve</code> throws this error.</p>
  
  <p>If I use <code>"main": "src/main.ts"</code>, the build process works, but when I use <code>vue-cli-service build</code>, <code>Vue</code> is bundled twice, once for <code>common</code> and once for <code>app</code>.</p>