Skip to content

Commit 9771696

Browse files
clydindgp1130
authored andcommitted
fix(@angular-devkit/build-angular): default preserve symlinks to Node.js value for esbuild
When using the experimental esbuild-based browser application builder, the `preserveSymlinks` option will now default to the value of the Node.js `--preserve-symlinks` argument. This removes the need to manually specify the option in two places if executing the build manually with Node.js or via the `NODE_OPTIONS` environment variable. This behavior mimics that of the default Webpack-based builder.
1 parent 5b18ce1 commit 9771696

File tree

1 file changed

+2
-1
lines changed
  • packages/angular_devkit/build_angular/src/builders/browser-esbuild

1 file changed

+2
-1
lines changed

packages/angular_devkit/build_angular/src/builders/browser-esbuild/options.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ export async function normalizeOptions(
152152
crossOrigin,
153153
externalDependencies,
154154
poll,
155-
preserveSymlinks,
155+
// If not explicitly set, default to the Node.js process argument
156+
preserveSymlinks: preserveSymlinks ?? process.execArgv.includes('--preserve-symlinks'),
156157
stylePreprocessorOptions,
157158
subresourceIntegrity,
158159
verbose,

0 commit comments

Comments
 (0)