Skip to content

Commit e3699cb

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

File tree

8 files changed

+10
-17
lines changed

8 files changed

+10
-17
lines changed

docs/documentation/1-x/angular-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
- *progress* (`boolean`): Log progress to the console while building. Default is `true`.
8484
- *poll* (`number`): Enable and define the file watching poll time period (milliseconds).
8585
- *deleteOutputPath* (`boolean`): Delete output path before build. Default is `true`.
86-
- *preserveSymlinks* (`boolean`): Do not use the real path when resolving modules. Default is `false`.
86+
- *preserveSymlinks* (`boolean`): Do not use the real path when resolving modules. Default is set to `true` if NodeJS option --preserve-symlinks is set.
8787
- *showCircularDependencies* (`boolean`): Show circular dependency warnings on builds. Default is `true`.
8888
- *namedChunks* (`boolean`): Use file name for lazy loaded chunks.
8989
- *serve*: Properties to be passed to the serve command

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."
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."
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."
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/angular_devkit/core/node/resolve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export interface ResolveOptions {
9090

9191
/**
9292
* Whether or not to preserve symbolic links. If false, the actual paths pointed by
93-
* the symbolic links will be used. This defaults to true.
93+
* the symbolic links will be used. Defaults to `true` if NodeJS option --preserve-symlinks is set.
9494
*/
9595
preserveSymlinks?: boolean;
9696

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)