mirror of
https://github.com/marko-js/marko.git
synced 2026-02-01 16:07:13 +00:00
fix: legacy compatibility issue with esm templates and defineWidget
This commit is contained in:
parent
c113eda7d9
commit
37b347eb5e
5
.changeset/spicy-turtles-travel.md
Normal file
5
.changeset/spicy-turtles-travel.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"marko": patch
|
||||
---
|
||||
|
||||
Improve compatibility of legacy Marko widgets loading a template compiled as esm.
|
||||
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user