title: Packaging Electron app into ASAR causes module not found error
body: <p>I am having an issue packing my application into a single <code>.asar</code> file.  I am using <code>electron-builder</code> to initiate packing of the .asarfile.  If I do not package the app into an asar, it works as expected if I unpack the generated asar, it also works as expected. </p>
  
  <p>However, running the electron using the asar produces this error:</p>
  
  <p><code>Error: Cannot find module './MyModuleBase'
      at Module._resolveFilename (internal/modules/cjs/loader.js:584:15)</code></p>
  
  <p>Previously, the asar was working without issue but we did some refactoring in the project splitting code out into a new module.</p>
  
  <p>**Initial Configuration  (ASAR Working) **</p>
  
  <pre><code>+--electron-application
    +--application
  </code></pre>
  
  <p><em><code>electron-application</code> depends on the <code>application</code> module.</em></p>
  
  <p>**New Configuration (ASAR Broken) **</p>
  
  <pre><code>+--electron-application
    +--application
      +--application-core
  </code></pre>
  
  <p><em><code>electron-application</code> depends on the <code>application</code> module and <code>application</code> depends on <code>application-core</code></em> <strong>MyModuleBase is in the application-core module</strong></p>
  
  <p>One other point which may be relevant: The application is being packaged with web-pack using the webpack-stream module.  </p>
  
  <p><strong>Update:</strong> I've solved the problem, however I would still like to know why the .asar version would fail and extracting the files would work.</p>