title: Angular 4 AOT with webpack
body: <p>I am using angular 4 with webpack 2 &amp; trying to use AOT, but its giving me this error: <code>10% building modules 4/5 modules 1 active ..._modules/intl/locale-data/jsonp/en.jsModuleNotFoundError: Module not found: Error: Can't resolve './../$$_gendir/src/app/app.module.ngfactory' in '/Users/xyz/angular-upgrade/backend/myapp/angular/src'</code>.</p>
  
  <p>This is my <code>webpack.config</code>:</p>
  
  <pre><code>new AotPlugin({
    tsConfigPath: './tsconfig.json',
    entryModule: './src/app/app.module#AppModule'
  }),
  </code></pre>
  
  <p>and the script I am using to make the build is: <code>"build": "rimraf dist &amp;&amp; webpack --config config/webpack.prod.js --progress --profile --bail"</code></p>
  
  <p>Below is my <code>tsconfig.json</code>:</p>
  
  <pre><code>{
    "compilerOptions": {
      "target": "es5",
      "module": "commonjs",
      "moduleResolution": "node",
      "sourceMap": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "lib": ["es2015", "dom"],
      "noImplicitAny": false,
      "suppressImplicitAnyIndexErrors": true
    },
    "exclude": [
      "node_modules",
      "bower_components"
    ]
  }
  </code></pre>