Repository navigation
solutions style tsconfig disappeared after update to angular 10.1 #18616
Description
Activity
That's because it has been intentionally removed, see #18478
Reacted by Michael PrenticeHi @xiaoxiangmoe,
Following numerous issues, we have discussed this internally and with the TypeScript team at Microsoft decided that for a better DX it's best to revert and remove solution style tsconfig.We are not excluding that in the future we re-introduce solution tsconfig.
@alan-agius4 Can you add options to skip remove solutions tsconfig? We need keep solution style tsconfig. This is a breaking change for the solutions tsconfig users.
@xiaoxiangmoe, can you please elaborate why this is a breaking change for you?
Is it because you have different
compilerOptionsfrom your root leveltsconfig.json?What do you mean by
so "./tsconfig.scripts.json" will not work after update to 10.1.0-next.7?Reacted by Michael Prentice- addedneeds: more infoReporter must clarify the issueReporter must clarify the issue
on Aug 26, 2020 Yes.
The ts files in the root dir have different compilerOptions. Update to ng 10.1 will break "./tsconfig.scripts.json".We understand that there might be a subset of users IDE experience might be effected by reverting the solutions style tsconfig.
At this stage, the recommended approach if you want to use different compiler options would be to place these files in a separate directory, rename
tsconfig.scripts.jsontotsconfig.jsonand move it inside the new directory.This is also something which the TypeScript team suggested to address some issues being experienced with solutions style tsconfig see: microsoft/TypeScript#39632 (comment)
Reacted by Michael Prentice- added and removedneeds: more infoReporter must clarify the issueReporter must clarify the issue
on Aug 27, 2020 Can we keep solution style tsconfig manually?
Will it still be removed in the future?(For example,update from ng 10.1 to ng 11)(Another infomation: we start use solution style tsconfig in angular 8, but it was removed in ng 10.1)
Can we only remove solution style tsconfig if it was updated from angular 10.0?Can we keep solution style tsconfig manually?
Will it still be removed in the future?
No, but using solutions style tsconfig at this point might result in broken journeys such as when new generate a new application, library etc, therefore I wouldn't recommend keeping solutions style tsconfig.(Another infomation: we start use solution style tsconfig in angular 8, but it was removed in ng 10.1) Can we only remove solution style tsconfig if it was updated from angular 10.0?
Solutions tsconfig was introduced in version 10 and will be removed in version 10.1.In future we might reconsider adding and supporting solutions style tsconfig but we need some changes on the TypeScript side. We, together with the TypeScript at Microsoft decided that for the best DX, it's best to rollback solutions style tsconfig and offer the same IDE experience that we did pre version 10.
In many cases, there are other approaches to solutions style tsconfig's. Such as create a sub-directory with a
tsconfig.jsoninside it, which at this point in time would be my recommended approach.Reacted by Michael Prenticeangular-automatic-lock-bot commented
on Sep 28, 2020 More actionsThis issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
- locked and limited conversation to collaborators
on Sep 28, 2020
🐞 Bug report
Command (mark with an
x)Description
I'm using solutions style tsconfig to add types for scripts.
// tsconfig.json
{ "files": [], "references": [ { "path": "./projects/my-app/tsconfig.app.json" }, { "path": "./projects/my-app/tsconfig.spec.json" }, { "path": "./tsconfig.scripts.json" } ] }// tsconfig.scripts.json
{ "compilerOptions": { "strict": true, "target": "ESNext", "module": "CommonJS", "esModuleInterop": true, "types": ["node"], "allowJs": true }, "include": ["./extra-webpack.config.ts","./build-script.ts"] }Update to ng 10.1 remove my solutions style tsconfig. So "./tsconfig.scripts.json" will not work after update to 10.1.0-next.7