fix(compiler-cli): propagate preserveWhitespaces option to codegen (#18773)
PR Close #18773
This commit is contained in:
parent
c0ba2b9ca7
commit
8ea6c56fe1
@ -103,6 +103,7 @@ export class CodeGenerator {
|
|||||||
locale: cliOptions.locale || undefined, missingTranslation,
|
locale: cliOptions.locale || undefined, missingTranslation,
|
||||||
enableLegacyTemplate: options.enableLegacyTemplate !== false,
|
enableLegacyTemplate: options.enableLegacyTemplate !== false,
|
||||||
enableSummariesForJit: options.enableSummariesForJit !== false,
|
enableSummariesForJit: options.enableSummariesForJit !== false,
|
||||||
|
preserveWhitespaces: options.preserveWhitespaces,
|
||||||
});
|
});
|
||||||
return new CodeGenerator(options, program, tsCompilerHost, aotCompiler, ngCompilerHost);
|
return new CodeGenerator(options, program, tsCompilerHost, aotCompiler, ngCompilerHost);
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,10 @@ interface Options extends ts.CompilerOptions {
|
|||||||
// matched by the `files` / `includes` in the `tsconfig.json`.
|
// matched by the `files` / `includes` in the `tsconfig.json`.
|
||||||
// This is off by default.
|
// This is off by default.
|
||||||
alwaysCompileGeneratedCode?: boolean;
|
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;
|
export default Options;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user