title: TypeError: Cannot read property 'environment' of undefined --- webpack in angular universal project
body: <p>I get this error:</p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'environment' of undefined --- webpack in angular universal project</p>
  </blockquote>
  
  <p>when I bundle my project with webpack:</p>
  
  <pre><code>webpack --config ./webpack/webpack.universal.config.js.
  </code></pre>
  
  <p>webpack.universal.config.json </p>
  
  <pre><code>plugins: [ new AngularCompilerPlugin({ tsConfigPath: root('./src/tsconfig.server.json'), skipCodeGeneration: false})]
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>"@angular/typescript": "^2.0.0-5d0e199",
  "@ngtools/webpack": "^1.10.2",
  "@nguniversal/express-engine": "^5.0.0",
  "@nguniversal/module-map-ngfactory-loader": "^5.0.0",
  "core-js": "^2.4.1",
  "enhanced-resolve": "^3.3.0",
  "express": "^4.16.3",
  "normalize-port": "^1.0.0",
  "rxjs": "^5.1.0",
  "script-ext-html-webpack-plugin": "^2.0.1",
  "serialize-javascript": "^1.5.0",
  "ts-loader": "^4.0.0",
  "webpack": "^3.11.0", 
  </code></pre>
  
  <p>is there someone saw this error before?</p>