Skip to content

Commit

Permalink
fix: legacy compatibility issue with esm templates and defineWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Nov 10, 2023
1 parent c113eda commit 37b347e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spicy-turtles-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"marko": patch
---

Improve compatibility of legacy Marko widgets loading a template compiled as esm.
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ module.exports = function defineWidget(def, renderer) {
template = req(template);
}

registry.r(template.___typeName, function () {
registry.r((template.default || template).___typeName, function () {
return Component;
});
}
Expand Down

0 comments on commit 37b347e

Please sign in to comment.