Skip to content

Commit

Permalink
make resolver-transform able to run without a pre-build
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Dec 19, 2024
1 parent b0db52e commit 6ea29c2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/compat/src/resolver-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,23 @@ class TemplateResolver implements ASTPlugin {
}

private get staticComponentsEnabled(): boolean {
if (!this.config?.options) {
return true;
}
return this.config.options.staticComponents || Boolean(this.auditHandler);
}

private get staticHelpersEnabled(): boolean {
if (!this.config?.options) {
return true;
}
return this.config.options.staticHelpers || Boolean(this.auditHandler);
}

private get staticModifiersEnabled(): boolean {
if (!this.config?.options) {
return true;
}
return this.config.options.staticModifiers || Boolean(this.auditHandler);
}

Expand All @@ -349,7 +358,7 @@ class TemplateResolver implements ASTPlugin {
// we're not responsible for filtering out rules for inactive packages here,
// that is done before getting to us. So we should assume these are all in
// force.
for (let rule of this.config.activePackageRules) {
for (let rule of this.config?.activePackageRules ?? []) {
if (rule.components) {
for (let [snippet, rules] of Object.entries(rule.components)) {
let processedRules = preprocessComponentRule(rules);
Expand Down

0 comments on commit 6ea29c2

Please sign in to comment.