Skip to content

Commit

Permalink
feat(@schematics/angular): use TypeScript bundler module resolution f…
Browse files Browse the repository at this point in the history
…or new projects

The `bundler` TypeScript resolution mode is now the default for all newly created
Angular CLI projects. This mode allows TypeScript to read and use any package.json
`exports` and `imports` fields found within packages including the Angular workspace.
Unlike the `node16` option value, this value does not require the use of file extensions
for each import and does not require modification of all existing application code to
use. The TypeScript language service also benefits from this option by allowing import
auto-discovery to leverage any `exports` defined for a package. This is particularly
useful for packages such as `@angular/material` which makes extensive use of secondary
package exports.

Additional information regarding this resolution mode can be found here:
https://www.typescriptlang.org/tsconfig#moduleResolution
  • Loading branch information
clydin committed Mar 13, 2024
1 parent af5d1b2 commit f452589
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"sourceMap": true,
"declaration": false,
"experimentalDecorators": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
Expand Down

1 comment on commit f452589

@celestius0
Copy link
Contributor

@celestius0 celestius0 commented on f452589 May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clydin This breaks the current implementation of some AngularFire typings unfortunately. I have not done further testing to see what else this might have broken, so there could be other issues that have arisen from this udpate. I have opened an issue for this here. Not sure if it's on them to fix or if this change should be reconsidered. 🤷

Please sign in to comment.