Skip to content

Commit f452589

Browse files
committed
feat(@schematics/angular): use TypeScript bundler module resolution for 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
1 parent af5d1b2 commit f452589

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/schematics/angular/workspace/files/tsconfig.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"sourceMap": true,
1515
"declaration": false,
1616
"experimentalDecorators": true,
17-
"moduleResolution": "node",
17+
"moduleResolution": "bundler",
1818
"importHelpers": true,
1919
"target": "ES2022",
2020
"module": "ES2022",

0 commit comments

Comments
 (0)