Skip to content

Commit

Permalink
fix: fix export of typescript types
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Aug 7, 2024
1 parent 5db29f9 commit 1c4e960
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ export default defineConfig({
},
plugins: [
dts({
afterBuild: async () => {
await fs.writeFile(
'dist/index.d.ts',
(await fs.readFile('dist/index.d.ts'))
.toString()
.replace(/\nexport .+/, '') + 'export = _default',
)
},
include: [
path.join(__dirname, 'index.ts'),
path.join(__dirname, 'typings'),
Expand Down

0 comments on commit 1c4e960

Please sign in to comment.