shlomiassaf / ngc-webpack

Angular compiler-cli with webpack's loader chain.
MIT License
84 stars 15 forks source link

ngc-webpack with `webpack.config.ts` does not work well #19

Closed watiko closed 7 years ago

watiko commented 7 years ago

Problem

When I build my project with webpack.config.ts which imports ngc-webpack, I got the following error:

          throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset))
                ^
TSError: ⨯ Unable to compile TypeScript
config\helpers.ts (10,25): Parameter 'flag' implicitly has an 'any' type. (7006)

Of course config/helpers.ts is fully typed and the project had built successfully before I have updated dependencies.

Investigation

I realized that ts-node should be loaded only once. (source: https://github.com/TypeStrong/ts-node/issues/333#issuecomment-301861566)

So my project register ts-node twice...

shlomiassaf commented 7 years ago

This should be fixed in 3.0.0