Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: de-default default export from stub
Browse files Browse the repository at this point in the history
danielroe committed Dec 13, 2024
1 parent 577b841 commit 0306a01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/builders/rollup/stub.ts
Original file line number Diff line number Diff line change
@@ -144,7 +144,7 @@ export async function rollupStub(ctx: BuildContext): Promise<void> {
`const _module = await jiti.import(${JSON.stringify(
resolvedEntry,
)});`,
hasDefaultExport ? "\nexport default _module;" : "",
hasDefaultExport ? "\nexport default _module.default || _module;" : "",
...namedExports
.filter((name) => name !== "default")
.map((name) => `export const ${name} = _module.${name};`),

0 comments on commit 0306a01

Please sign in to comment.