fix(compiler): don’t type check templates with skipTemplateCodegen
(#19909)
This change is needed to prevent users’ builds from breaking. If a user sets `fullTemlateTypeCheck` to true, we will continue to check the templates even when `skipTemplateCodegen` is true as well. Related to #19906 PR Close #19909
This commit is contained in:

committed by
Matias Niemelä

parent
f1108fea76
commit
18bce5987c
@ -181,13 +181,15 @@ function convert(annotatedSource: string) {
|
||||
[fileName], {module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2017}, host);
|
||||
const moduleSourceFile = program.getSourceFile(fileName);
|
||||
const transformers: ts.CustomTransformers = {
|
||||
before: [getExpressionLoweringTransformFactory({
|
||||
getRequests(sourceFile: ts.SourceFile): RequestLocationMap{
|
||||
if (sourceFile.fileName == moduleSourceFile.fileName) {
|
||||
return requests;
|
||||
} else {return new Map();}
|
||||
}
|
||||
})]
|
||||
before: [getExpressionLoweringTransformFactory(
|
||||
{
|
||||
getRequests(sourceFile: ts.SourceFile): RequestLocationMap{
|
||||
if (sourceFile.fileName == moduleSourceFile.fileName) {
|
||||
return requests;
|
||||
} else {return new Map();}
|
||||
}
|
||||
},
|
||||
program)]
|
||||
};
|
||||
let result: string = '';
|
||||
const emitResult = program.emit(
|
||||
|
Reference in New Issue
Block a user