refactor(compiler): don’t write summaries for jit by default
The default is false externally but true internally at Google.
This commit is contained in:

committed by
Alex Rickabaugh

parent
d56b7ed96d
commit
90b0713e32
@ -100,6 +100,7 @@ export class CodeGenerator {
|
||||
i18nFormat: cliOptions.i18nFormat,
|
||||
locale: cliOptions.locale, missingTranslation,
|
||||
enableLegacyTemplate: options.enableLegacyTemplate !== false,
|
||||
enableSummariesForJit: options.enableSummariesForJit !== false,
|
||||
});
|
||||
return new CodeGenerator(options, program, tsCompilerHost, aotCompiler, ngCompilerHost);
|
||||
}
|
||||
|
@ -20,6 +20,10 @@ import {CodeGenerator} from './codegen';
|
||||
function codegen(
|
||||
ngOptions: tsc.AngularCompilerOptions, cliOptions: tsc.NgcCliOptions, program: ts.Program,
|
||||
host: ts.CompilerHost) {
|
||||
if (ngOptions.enableSummariesForJit === undefined) {
|
||||
// default to false
|
||||
ngOptions.enableSummariesForJit = false;
|
||||
}
|
||||
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
|
||||
}
|
||||
|
||||
|
@ -99,10 +99,15 @@ export class NgTools_InternalApi_NG_2 {
|
||||
missingTranslation: options.missingTranslation !,
|
||||
basePath: options.basePath
|
||||
};
|
||||
const ngOptions = options.angularCompilerOptions;
|
||||
if (ngOptions.enableSummariesForJit === undefined) {
|
||||
// default to false
|
||||
ngOptions.enableSummariesForJit = false;
|
||||
}
|
||||
|
||||
// Create the Code Generator.
|
||||
const codeGenerator = CodeGenerator.create(
|
||||
options.angularCompilerOptions, cliOptions, options.program, options.host, hostContext);
|
||||
const codeGenerator =
|
||||
CodeGenerator.create(ngOptions, cliOptions, options.program, options.host, hostContext);
|
||||
|
||||
return codeGenerator.codegen();
|
||||
}
|
||||
|
Reference in New Issue
Block a user