Skip to content

Commit 3282882

Browse files
author
Fabian Wiles
committed
feat(@angular-devkit/build-angular): default to NodeJS value for preserveSymlinks
1 parent 30df147 commit 3282882

File tree

7 files changed

+10
-16
lines changed

7 files changed

+10
-16
lines changed

packages/angular/cli/lib/config/schema.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,7 @@
844844
},
845845
"preserveSymlinks": {
846846
"type": "boolean",
847-
"description": "Do not use the real path when resolving modules.",
848-
"default": false
847+
"description": "Do not use the real path when resolving modules."
849848
},
850849
"extractLicenses": {
851850
"type": "boolean",
@@ -1478,8 +1477,7 @@
14781477
},
14791478
"preserveSymlinks": {
14801479
"type": "boolean",
1481-
"description": "Do not use the real path when resolving modules.",
1482-
"default": false
1480+
"description": "Do not use the real path when resolving modules."
14831481
},
14841482
"browsers": {
14851483
"type": "string",
@@ -1855,8 +1853,7 @@
18551853
},
18561854
"preserveSymlinks": {
18571855
"type": "boolean",
1858-
"description": "Do not use the real path when resolving modules.",
1859-
"default": false
1856+
"description": "Do not use the real path when resolving modules."
18601857
},
18611858
"extractLicenses": {
18621859
"type": "boolean",

packages/angular_devkit/build_angular/src/browser/schema.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@
248248
},
249249
"preserveSymlinks": {
250250
"type": "boolean",
251-
"description": "Do not use the real path when resolving modules.",
252-
"default": false
251+
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
253252
},
254253
"extractLicenses": {
255254
"type": "boolean",

packages/angular_devkit/build_angular/src/karma/schema.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@
126126
},
127127
"preserveSymlinks": {
128128
"type": "boolean",
129-
"description": "Do not use the real path when resolving modules.",
130-
"default": false
129+
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
131130
},
132131
"browsers": {
133132
"type": "string",

packages/angular_devkit/build_angular/src/server/schema.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@
198198
},
199199
"preserveSymlinks": {
200200
"type": "boolean",
201-
"description": "Do not use the real path when resolving modules.",
202-
"default": false
201+
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
203202
},
204203
"extractLicenses": {
205204
"type": "boolean",

packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function normalizeBrowserSchema(
5353
fileReplacements: normalizeFileReplacements(options.fileReplacements || [], syncHost, root),
5454
optimization: normalizeOptimization(options.optimization),
5555
sourceMap: normalizedSourceMapOptions,
56-
56+
preserveSymlinks: options.preserveSymlinks === undefined ? process.execArgv.includes('--preserve-symlinks') : options.preserveSymlinks,
5757
statsJson: options.statsJson || false,
5858
forkTypeChecker: options.forkTypeChecker || false,
5959
budgets: options.budgets || [],

packages/schematics/angular/utility/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,8 @@ export interface CliConfig {
388388
*/
389389
deleteOutputPath?: boolean;
390390
/**
391-
* Do not use the real path when resolving modules.
391+
* Do not use the real path when resolving modules.
392+
* set.
392393
*/
393394
preserveSymlinks?: boolean;
394395
/**

tests/angular_devkit/core/json/schema/serializers/schema_benchmark.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,7 @@
480480
},
481481
"preserveSymlinks": {
482482
"description": "Do not use the real path when resolving modules.",
483-
"type": "boolean",
484-
"default": false
483+
"type": "boolean"
485484
},
486485
"showCircularDependencies": {
487486
"description": "Show circular dependency warnings on builds.",

0 commit comments

Comments
 (0)