title: Angular 5 webpack compilation error
body: <p>After upgrading to Angular 5 and Cli 1.5, on <code>ng serve</code> I am getting an error:</p>
  
  <pre><code>ERROR in ./node_modules/@stomp/ng2-stompjs/index.ts
      Module build failed: Error: ...\project\node_modules\@stomp\ng2-stompjs\index.ts is not part of the compilation output. Please check the other error messages for details.
          at AngularCompilerPlugin.getCompiledFile (...\project\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:629:23)
          at plugin.done.then (...\project\node_modules\@ngtools\webpack\src\loader.js:467:39)
          at &lt;anonymous&gt;
          at process._tickCallback (internal/process/next_tick.js:188:7)
       @ ./src/app/app.module.ts 27:0-63
       @ ./src/main.ts
       @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
  </code></pre>
  
  <p>I have tried to add <code>include</code> to my <code>tsconfig.app.json</code> so it looks like this:</p>
  
  <pre><code>{
    "extends": "../tsconfig.json",
    "compilerOptions": {
      "outDir": "../out-tsc/app",
      "module": "es2015",
      "baseUrl": "",
      "types": []
    },
    "include": [
      "../node_modules/@stomp/**/*.ts"
    ],
    "exclude": [
      "test.ts",
      "**/*.spec.ts"
    ]
  }
  </code></pre>
  
  <p>I tried re-run <code>ng serve</code> I got another error: </p>
  
  <pre><code>    ERROR in ./src/main.ts
  Module build failed: Error: ...project\chatAngular4\src\main.ts is not part of the compilation output. Please check the other error messages for details.
      at AngularCompilerPlugin.getCompiledFile (...project\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:629:23)
      at plugin.done.then (...project\node_modules\@ngtools\webpack\src\loader.js:467:39)
      at &lt;anonymous&gt;
      at process._tickCallback (internal/process/next_tick.js:188:7)
   @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
  ERROR in ./src/polyfills.ts
  Module build failed: Error: C:\Users\MEP2\Desktop\chatAngular4\src\polyfills.ts is not part of the compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
      at AngularCompilerPlugin.getCompiledFile (...project\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:624:23)
      at plugin.done.then (...project\node_modules\@ngtools\webpack\src\loader.js:467:39)
      at &lt;anonymous&gt;
   @ multi ./src/polyfills.ts
  </code></pre>
  
  <p>This looks like it needs some kind of generic workaround. Any ideas?</p>
  
  <hr>
  
  <p><strong>Update</strong></p>
  
  <p>After updating all packages to latest version, problem disapeared</p>