From 079bb51b6e985e989f61ca58234142cdef45bca8 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 21 Sep 2021 20:01:47 +0200 Subject: [PATCH] fix: enable back interopDefault for esm stub for now --- src/builder/rollup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/builder/rollup.ts b/src/builder/rollup.ts index 866d57f5..b2c1541c 100644 --- a/src/builder/rollup.ts +++ b/src/builder/rollup.ts @@ -16,7 +16,7 @@ export async function rollupBuild (ctx: BuildContext) { for (const entry of ctx.entries.filter(entry => entry.builder === 'rollup')) { const output = resolve(ctx.rootDir, ctx.outDir, entry.name) await writeFile(output + '.cjs', `module.exports = require('jiti')(null, { interopDefault: true })('${entry.input}')`) - await writeFile(output + '.mjs', `import jiti from 'jiti';\nexport default jiti()('${entry.input}');`) + await writeFile(output + '.mjs', `import jiti from 'jiti';\nexport default jiti(null, { interopDefault: true })('${entry.input}');`) await writeFile(output + '.d.ts', `export * from '${entry.input}'`) } return