Skip to content

Commit 6c91431

Browse files
committed
refactor: move baseUrl fallback logic to paths-plugin.ts
This ensure that we do not set `baseUrl` internally which would trigger a deprecation warning.
1 parent 843ca01 commit 6c91431

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

packages/ngtools/webpack/src/ivy/plugin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ export class AngularWebpackPlugin {
410410
this.pluginOptions.tsconfig,
411411
this.pluginOptions.compilerOptions,
412412
);
413-
compilerOptions.baseUrl ??= compilerOptions['pathsBasePath'];
414413
compilerOptions.composite = false;
415414
compilerOptions.noEmitOnError = false;
416415
compilerOptions.suppressOutputPathCheck = true;

packages/ngtools/webpack/src/paths-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class TypeScriptPathsPlugin {
4545
* @param options The `paths` and `baseUrl` options from TypeScript's `CompilerOptions`.
4646
*/
4747
update(options: TypeScriptPathsPluginOptions): void {
48-
this.baseUrl = options.baseUrl;
48+
this.baseUrl = options.baseUrl ?? (options as Record<string, string>)['pathsBasePath'];
4949
this.patterns = undefined;
5050

5151
if (options.paths) {

0 commit comments

Comments
 (0)