From f452589e2c921448b76a138a5f34ba92ad05e297 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:59:16 -0400 Subject: [PATCH] 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 --- .../schematics/angular/workspace/files/tsconfig.json.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/workspace/files/tsconfig.json.template b/packages/schematics/angular/workspace/files/tsconfig.json.template index f5dde42b401c..98c288252e4f 100644 --- a/packages/schematics/angular/workspace/files/tsconfig.json.template +++ b/packages/schematics/angular/workspace/files/tsconfig.json.template @@ -14,7 +14,7 @@ "sourceMap": true, "declaration": false, "experimentalDecorators": true, - "moduleResolution": "node", + "moduleResolution": "bundler", "importHelpers": true, "target": "ES2022", "module": "ES2022",