Skip to content

Commit

Permalink
fix: always return init as default export
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 28, 2023
1 parent d6c45d6 commit 705e178
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/plugin/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ ${asset.exports
.map((name) => `export const ${name} = $exports.${name};`)
.join("\n")}
export const $init = () => $exports;
export default $exports;
export default () => $exports;
`;
} else {
// --- Proxied exports when imports are needed or we can't have top-level await ---
Expand All @@ -59,8 +57,6 @@ ${asset.exports
.map((name) => `export const ${name} = _mod.${name};`)
.join("\n")}
export const $init = _mod.$init.bind(_mod);
export default _mod;
`;
}
Expand Down

0 comments on commit 705e178

Please sign in to comment.