Skip to content

Commit 7c6eacb

Browse files
committed
[v8] fix: bundle ESM-only deps for CJS compatibility
iron-webcrypto and uint8array-extras are ESM-only packages. Without bundling, CJS consumers get ERR_REQUIRE_ESM errors and need special Jest/bundler configuration.
1 parent 9bc90ae commit 7c6eacb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tsdown.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export default defineConfig({
1616
clean: true,
1717
dts: true,
1818
unbundle: true,
19+
// bundle ESM-only deps for CJS compatibility
20+
noExternal: ['iron-webcrypto', 'uint8array-extras'],
1921
outExtensions({ format }) {
2022
return {
2123
js: format === 'cjs' ? '.cjs' : '.js',

0 commit comments

Comments
 (0)