Skip to content

Commit 16db656

Browse files
committed
feat(@angular/cli): propagate --preserve-symlinks on TS options
With TypeScript 2.5 supporting the `--preserve-symlinks` option, we should set it on the compiler options when the flag is passed into the CLI (it already works for webpack). See https://blogs.msdn.microsoft.com/typescript/2017/08/31/announcing-typescript-2-5/#user-content-the---preservesymlinks-compiler-flag for more info.
1 parent 8ddfebe commit 16db656

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ const webpackLoader: string = g['angularCliIsLocal']
1414

1515
function _createAotPlugin(wco: WebpackConfigOptions, options: any) {
1616
const { appConfig, projectRoot, buildOptions } = wco;
17+
options.compilerOptions = options.compilerOptions || {};
18+
if (wco.buildOptions.preserveSymlinks) {
19+
options.compilerOptions.preserveSymlinks = true;
20+
}
1721

1822
// Read the environment, and set it in the compiler host.
1923
let hostReplacementPaths: any = {};

0 commit comments

Comments
 (0)