Skip to content

Commit

Permalink
feat(@angular/cli): add option to preserve symlinks for module resolu…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
Charles Lyding authored and filipesilva committed Jun 7, 2017
1 parent def3d53 commit 81af71a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/@angular/cli/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ export const baseBuildCommandOptions: any = [
default: true,
aliases: ['dop'],
description: 'Delete output path before build.'
},
{
name: 'preserve-symlinks',
type: Boolean,
default: false,
description: 'Do not use the real path when resolving modules.'
}
];

Expand Down
1 change: 1 addition & 0 deletions packages/@angular/cli/models/build-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export interface BuildOptions {
poll?: number;
app?: string;
deleteOutputPath?: boolean;
preserveSymlinks?: boolean;
}
1 change: 1 addition & 0 deletions packages/@angular/cli/models/webpack-configs/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
resolve: {
extensions: ['.ts', '.js'],
modules: ['node_modules', nodeModules],
symlinks: !buildOptions.preserveSymlinks
},
resolveLoader: {
modules: [nodeModules, 'node_modules']
Expand Down

0 comments on commit 81af71a

Please sign in to comment.