Skip to content

Commit 81af71a

Browse files
Charles Lydingfilipesilva
Charles Lyding
authored andcommitted
feat(@angular/cli): add option to preserve symlinks for module resolution
1 parent def3d53 commit 81af71a

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

packages/@angular/cli/commands/build.ts

+6
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ export const baseBuildCommandOptions: any = [
125125
default: true,
126126
aliases: ['dop'],
127127
description: 'Delete output path before build.'
128+
},
129+
{
130+
name: 'preserve-symlinks',
131+
type: Boolean,
132+
default: false,
133+
description: 'Do not use the real path when resolving modules.'
128134
}
129135
];
130136

packages/@angular/cli/models/build-options.ts

+1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ export interface BuildOptions {
1818
poll?: number;
1919
app?: string;
2020
deleteOutputPath?: boolean;
21+
preserveSymlinks?: boolean;
2122
}

packages/@angular/cli/models/webpack-configs/common.ts

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
6868
resolve: {
6969
extensions: ['.ts', '.js'],
7070
modules: ['node_modules', nodeModules],
71+
symlinks: !buildOptions.preserveSymlinks
7172
},
7273
resolveLoader: {
7374
modules: [nodeModules, 'node_modules']

0 commit comments

Comments
 (0)