Skip to content

Commit

Permalink
fix(compiler): Fix the template pipeline option (#54148)
Browse files Browse the repository at this point in the history
The `useTemplatePipeline` option was not properly threaded through the component handler.

PR Close #54148
  • Loading branch information
dylhunn authored and thePunderWoman committed Jan 29, 2024
1 parent 3ca34e6 commit 7b4d275
Showing 1 changed file with 11 additions and 2 deletions.
Expand Up @@ -1105,10 +1105,12 @@ export class ComponentDecoratorHandler implements

const deferrableTypes = this.collectDeferredSymbols(resolution);

const useTemplatePipeline = this.useTemplatePipeline;
const meta: R3ComponentMetadata<R3TemplateDependency> = {
...analysis.meta,
...resolution,
deferrableTypes,
useTemplatePipeline,
};
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget.Component));

Expand Down Expand Up @@ -1141,8 +1143,13 @@ export class ComponentDecoratorHandler implements
new WrappedNodeExpr(analysis.template.sourceMapping.node) :
null,
};
const meta:
R3ComponentMetadata<R3TemplateDependencyMetadata> = {...analysis.meta, ...resolution};

const useTemplatePipeline = this.useTemplatePipeline;
const meta: R3ComponentMetadata<R3TemplateDependencyMetadata> = {
...analysis.meta,
...resolution,
useTemplatePipeline
};
const fac = compileDeclareFactory(toFactoryMetadata(meta, FactoryTarget.Component));
const inputTransformFields = compileInputTransformFields(analysis.inputs);
const def = compileDeclareComponentFromMetadata(meta, analysis.template, templateInfo);
Expand All @@ -1166,10 +1173,12 @@ export class ComponentDecoratorHandler implements
// doesn't have information on which dependencies belong to which defer blocks.
const deferrableTypes = analysis.explicitlyDeferredTypes;

const useTemplatePipeline = this.useTemplatePipeline;
const meta = {
...analysis.meta,
...resolution,
deferrableTypes: deferrableTypes ?? new Map(),
useTemplatePipeline,
} as R3ComponentMetadata<R3TemplateDependency>;

if (analysis.explicitlyDeferredTypes !== null) {
Expand Down

0 comments on commit 7b4d275

Please sign in to comment.