diff --git a/src/builders/rollup/stub.ts b/src/builders/rollup/stub.ts index d9e5423..8fcdc21 100644 --- a/src/builders/rollup/stub.ts +++ b/src/builders/rollup/stub.ts @@ -144,7 +144,9 @@ export async function rollupStub(ctx: BuildContext): Promise { `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};`),