Closed watiko closed 7 years ago
When I build my project with webpack.config.ts which imports ngc-webpack, I got the following error:
webpack.config.ts
ngc-webpack
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.
config/helpers.ts
I realized that ts-node should be loaded only once. (source: https://github.com/TypeStrong/ts-node/issues/333#issuecomment-301861566)
ts-node
require('ts-node/register')
webpack
So my project register ts-node twice...
This should be fixed in 3.0.0
Problem
When I build my project with
webpack.config.ts
which importsngc-webpack
, I got the following error: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)require('ts-node/register')
intongc-webpack
itself.webpack
registerts-node
automatically in detectingwebpack.config.ts
. (source: https://github.com/webpack/webpack/blob/v2.6.1/bin/convert-argv.js)So my project register
ts-node
twice...