Skip to content

Commit 6c9580e

Browse files
authored
[v8] fix: bundle ESM-only deps for CJS compatibility (#1423)
Bundle `iron-webcrypto` and `uint8array-extras` into the build output using `noExternal`. These packages are ESM-only and cause `ERR_REQUIRE_ESM` errors for CJS consumers without special Jest/bundler configuration.
1 parent 9bc90ae commit 6c9580e

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)