angular-cli
angular-cli copied to clipboard
Update default `tsconfig.json` options
Command
new, update
Description
It's been a while since we've looked at recent TypeScript configuration changes and refreshed the default Angular setup. We should review recent additions and changes to look for anything we want to enable in ng new
as well as through ng update
for existing apps.
Two options in particular which stand out:
-
moduleResolution: 'bundler'
- This seems appropriate given our esbuild / Webpack usage. -
allowSyntheticDefaultImports: true
- I believe this is recommended by the TypeScript team. -
esModuleInterop: true
- This is highly recommended for our esbuild setup and maybe we should just make it the default.
We don't need to be specifically limited to these three options, but those are the immediate ones to consider.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
In version 17, for new apps we now enable esModuleInterop
, which also enables allowSyntheticDefaultImports
.
Also, should downlevelIteration
be set to false by default in year of 2023? Do we really need to to support <ES2015?
Also, should
downlevelIteration
be set to false by default in year of 2023? Do we really need to to support <ES2015?
Starting with Angular CLI 17.0.1 in new generated workspaces downlevelIteration
is no longer set (see https://github.com/angular/angular-cli/commit/f7f62c9d6988e6801981592f56137cd02bfe2316).
Closing as this has been completed as part of version 18 where we added moduleResolution: 'bundler'
This 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.