Skip to content

Commit 8ea6c56

Browse files
pkozlowski-opensourcemhevery
authored andcommitted
fix(compiler-cli): propagate preserveWhitespaces option to codegen (#18773)
PR Close #18773
1 parent c0ba2b9 commit 8ea6c56

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packages/compiler-cli/src/codegen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export class CodeGenerator {
103103
locale: cliOptions.locale || undefined, missingTranslation,
104104
enableLegacyTemplate: options.enableLegacyTemplate !== false,
105105
enableSummariesForJit: options.enableSummariesForJit !== false,
106+
preserveWhitespaces: options.preserveWhitespaces,
106107
});
107108
return new CodeGenerator(options, program, tsCompilerHost, aotCompiler, ngCompilerHost);
108109
}

packages/tsc-wrapped/src/options.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ interface Options extends ts.CompilerOptions {
8787
// matched by the `files` / `includes` in the `tsconfig.json`.
8888
// This is off by default.
8989
alwaysCompileGeneratedCode?: boolean;
90+
91+
// Whether to remove blank text nodes from compiled templates. It is `true` by default
92+
// in Angular 5 and will be re-visited in Angular 6.
93+
preserveWhitespaces?: boolean;
9094
}
9195

9296
export default Options;

0 commit comments

Comments
 (0)