Skip to content

Commit

Permalink
fix(compiler-cli): propagate preserveWhitespaces option to codegen (#…
Browse files Browse the repository at this point in the history
…18773)

PR Close #18773
  • Loading branch information
pkozlowski-opensource authored and mhevery committed Aug 21, 2017
1 parent c0ba2b9 commit 8ea6c56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/compiler-cli/src/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export class CodeGenerator {
locale: cliOptions.locale || undefined, missingTranslation,
enableLegacyTemplate: options.enableLegacyTemplate !== false,
enableSummariesForJit: options.enableSummariesForJit !== false,
preserveWhitespaces: options.preserveWhitespaces,
});
return new CodeGenerator(options, program, tsCompilerHost, aotCompiler, ngCompilerHost);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/tsc-wrapped/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ interface Options extends ts.CompilerOptions {
// matched by the `files` / `includes` in the `tsconfig.json`.
// This is off by default.
alwaysCompileGeneratedCode?: boolean;

// Whether to remove blank text nodes from compiled templates. It is `true` by default
// in Angular 5 and will be re-visited in Angular 6.
preserveWhitespaces?: boolean;
}

export default Options;

0 comments on commit 8ea6c56

Please sign in to comment.