Skip to content

Commit 0bda5c5

Browse files
committed
fix: add shims for ESM/CJS interop
1 parent 3ea452a commit 0bda5c5

3 files changed

Lines changed: 1171 additions & 1 deletion

File tree

dist/index.js

Lines changed: 1164 additions & 0 deletions
Large diffs are not rendered by default.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsup.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,10 @@ export default defineConfig({
1616
treeshake: true,
1717
// Output as .js not .cjs for GitHub Actions compatibility
1818
outExtension: () => ({ js: '.js' }),
19+
// Add shims for ESM/CJS interop
20+
shims: true,
21+
// Use esbuild's CJS output directly without tsup's interop wrapper
22+
esbuildOptions(options) {
23+
options.mainFields = ['module', 'main'];
24+
},
1925
});

0 commit comments

Comments
 (0)