feat(webpack): support tsconfig.app.json when present #10221
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
What is the current behavior?
Only Angular projects support
tsconfig.app.json
.What is the new behavior?
Any project using typescript will use the
tsconfig.app.json
if it exists (and fall back totsconfig.json
otherwise).Motivation behind this change
It's common to have different tsconfigs to provide different types for VSCode intellisense, however sometimes these config changes should only apply to VSCode (or any editor) and not the app itself. In these cases this change allows setting editor defaults in
tsconfig.json
and then app defaults intsconfig.app.json
.A good example where this might be useful is when you need to have intellisense in
spec
files by having atsconfig.spec.json
which needs to be referenced intsconfig.json
(solution-style tsconfig), however the app itself fails to compile with solution style configuration, so it needs atsconfig.app.json
that is not solution-style.Alternative
The same can be achieved in user-config: