You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tsconfig app update migration for version 9 of the CLI creates invalid references inside tsconfig files. This causes the app compilation to break, and potentially breaks subsequent migrations as the TS project is no longer valid (e.g. the undecorated classes-with-di migration).
The migration currently naively assumes the main.ts files is always next to the tsconfig.
This is not very reliable as often the target is structured differently, or the main.ts file has a different name. This is totally valid since there is an builder option called main that can be set to an arbitrary file.
Ideally the migration would not try to guess the path to the main file, but rather rely on the builder options. An example of a scenario that currently breaks:
In those cases, the current migration logic will insert ./main.ts into the tsconfig, while it should be actually ./src/main.ts. Same most likely applies to the polyfills.ts file. Ideally this would be resolved through the polyfills builder option.
The tsconfig app update migration for version 9 of the CLI creates invalid references inside tsconfig files. This causes the app compilation to break, and potentially breaks subsequent migrations as the TS project is no longer valid (e.g. the undecorated classes-with-di migration).
The migration currently naively assumes the
main.ts
files is always next to the tsconfig.angular-cli/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts
Lines 85 to 89 in e70a2b0
This is not very reliable as often the target is structured differently, or the
main.ts
file has a different name. This is totally valid since there is an builder option calledmain
that can be set to an arbitrary file.Ideally the migration would not try to guess the path to the main file, but rather rely on the builder options. An example of a scenario that currently breaks:
In those cases, the current migration logic will insert
./main.ts
into the tsconfig, while it should be actually./src/main.ts
. Same most likely applies to thepolyfills.ts
file. Ideally this would be resolved through thepolyfills
builder option.cc. @filipesilva
The text was updated successfully, but these errors were encountered: