Skip to content

Commit ce9bf81

Browse files
committed
refactor(@angular-devkit/build-angular): remove no longer needed realpathSync
This is no longer needed since the path provided is already passed through `realpathSync`. https://github.com/angular/angular-cli/blob/9d7d136b32a8bb0e0d70a502071418c9e4beaa05/packages/angular_devkit/build_angular/src/builders/application/options.ts#L104-L109
1 parent efe3bda commit ce9bf81

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

packages/angular_devkit/build_angular/src/tools/esbuild/angular/compiler-plugin.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import type {
1616
PluginBuild,
1717
} from 'esbuild';
1818
import assert from 'node:assert';
19-
import { realpathSync } from 'node:fs';
2019
import * as path from 'node:path';
2120
import { maxWorkers } from '../../../utils/environment-options';
2221
import { JavaScriptTransformer } from '../javascript-transformer';
@@ -57,18 +56,6 @@ export function createCompilerPlugin(
5756
let setupWarnings: PartialMessage[] | undefined = [];
5857
const preserveSymlinks = build.initialOptions.preserveSymlinks;
5958

60-
let tsconfigPath = pluginOptions.tsconfig;
61-
if (!preserveSymlinks) {
62-
// Use the real path of the tsconfig if not preserving symlinks.
63-
// This ensures the TS source file paths are based on the real path of the configuration.
64-
// NOTE: promises.realpath should not be used here since it uses realpath.native which
65-
// can cause case conversion and other undesirable behavior on Windows systems.
66-
// ref: https://github.com/nodejs/node/issues/7726
67-
try {
68-
tsconfigPath = realpathSync(tsconfigPath);
69-
} catch {}
70-
}
71-
7259
// Initialize a worker pool for JavaScript transformations
7360
const javascriptTransformer = new JavaScriptTransformer(pluginOptions, maxWorkers);
7461

@@ -240,7 +227,7 @@ export function createCompilerPlugin(
240227
let referencedFiles;
241228
try {
242229
const initializationResult = await compilation.initialize(
243-
tsconfigPath,
230+
pluginOptions.tsconfig,
244231
hostOptions,
245232
createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserveSymlinks),
246233
);

0 commit comments

Comments
 (0)