title: can't resolve app.module.ngfactory when using yarn webpack:prod
body: <p>In my application, the front-end and back-end are separated, get this issue when I issue:</p>
  
  <pre><code>yarn webpack:prod
  </code></pre>
  
  <p>to generate a front-end package for production. however:</p>
  
  <pre><code>yarn start 
  </code></pre>
  
  <p>works fine.</p>
  
  <p>Note:
  angular version is 5.1.0
  jhipter version is 4.14.3
  yarn version is 1.3.2</p>
  
  <p>Very appreciated for any suggestion and help.</p>