Skip to content

Commit

Permalink
fix(stub): re-export default in dts stub (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 3, 2021
1 parent 2fdfa11 commit 468347f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/builder/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function rollupBuild (ctx: BuildContext) {
await writeFile(output + '.cjs', `module.exports = require('jiti')(null, { interopDefault: true })('${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}'`)
await writeFile(output + '.d.ts', `export * from '${entry.input}';\nexport { default } from '${entry.input}';`)
}
await ctx.hooks.callHook('rollup:done', ctx)
return
Expand Down

0 comments on commit 468347f

Please sign in to comment.