Skip to content

Commit

Permalink
Push
Browse files Browse the repository at this point in the history
  • Loading branch information
PuruVJ committed Jul 20, 2024
1 parent d8ca326 commit 6763ac5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { readFile, writeFile } from 'fs/promises';
import { defineConfig } from 'tsup';

export default defineConfig([
Expand Down Expand Up @@ -55,5 +56,9 @@ export default defineConfig([
target: 'es5',
minify: false,
outDir: 'dist/legacy',
onSuccess: async () => {
const file = await readFile('dist/legacy/legacy.mjs', 'utf-8');
await writeFile('dist/legacy/legacy.mjs', file.replace(/module\.exports = (.+);/, ''));
},
},
]);

0 comments on commit 6763ac5

Please sign in to comment.