perf(core): add option to remove blank text nodes from compiled templates
This commit is contained in:
@ -111,6 +111,10 @@ export interface CompilerOptions extends ts.CompilerOptions {
|
||||
i18nInFile?: string;
|
||||
// How to handle missing messages
|
||||
i18nInMissingTranslations?: 'error'|'warning'|'ignore';
|
||||
|
||||
// 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 interface ModuleFilenameResolver {
|
||||
|
@ -347,6 +347,7 @@ function getAotCompilerOptions(options: CompilerOptions): AotCompilerOptions {
|
||||
i18nFormat: options.i18nInFormat || options.i18nOutFormat, translations, missingTranslation,
|
||||
enableLegacyTemplate: options.enableLegacyTemplate,
|
||||
enableSummariesForJit: true,
|
||||
preserveWhitespaces: options.preserveWhitespaces,
|
||||
};
|
||||
}
|
||||
|
||||
@ -480,4 +481,4 @@ function createProgramWithStubsHost(
|
||||
fileExists = (fileName: string) =>
|
||||
this.generatedFiles.has(fileName) || originalHost.fileExists(fileName);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user