feat(bundler): map generator export to globalThis.generator

This commit is contained in:
pj committed 2026-07-13 07:02:56 +05:30
1 parent c38c21dea1
commit aa67d7ddcf
2 files changed
+6 -1

No files matched your search

+1
View File
@@ -110,6 +110,7 @@ func Bundle(options Options) (Result, error) {
func registrationEntry(specAbs string) string {
return fmt.Sprintf(`import * as __spec from %q;
if (__spec.actionsRoot !== undefined) globalThis.actions = __spec.actionsRoot;
if (__spec.generator !== undefined) globalThis.generator = __spec.generator;
if (__spec.properties !== undefined) globalThis.properties = __spec.properties;
if (__spec.setup !== undefined) globalThis.setup = __spec.setup;
`, specAbs)