Skip to content

Commit 3d9971e

Browse files
clydindgp1130
authored andcommittedDec 5, 2022
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. (cherry picked from commit 9771696)
1 parent 24f4b51 commit 3d9971e

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)
Please sign in to comment.