Skip to content

Commit e8e141b

Browse files
committed
fix: turn on cjs module interop in rollup
1 parent a7c234a commit e8e141b

3 files changed

Lines changed: 1 addition & 92 deletions

File tree

package-lock.json

Lines changed: 0 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
"devDependencies": {
7878
"@contentful/integration-test-utils": "^2.0.1",
7979
"@eslint/js": "^9.15.0",
80-
"@rollup/plugin-commonjs": "^29.0.0",
8180
"@rollup/plugin-json": "^6.1.0",
8281
"@rollup/plugin-node-resolve": "^16.0.3",
8382
"@rollup/plugin-replace": "^6.0.3",

rollup.config.mjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import pkg from './package.json' with { type: 'json' }
22
import nodeResolve from '@rollup/plugin-node-resolve'
3-
import commonjs from '@rollup/plugin-commonjs'
43
import json from '@rollup/plugin-json'
54
import replace from '@rollup/plugin-replace'
65
import typescript from '@rollup/plugin-typescript'
@@ -21,13 +20,6 @@ const baseConfig = {
2120
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
2221
__VERSION__: JSON.stringify(pkg.version),
2322
}),
24-
commonjs({
25-
sourceMap: true,
26-
transformMixedEsModules: true,
27-
ignoreGlobal: true,
28-
ignoreDynamicRequires: true,
29-
requireReturnsDefault: 'auto',
30-
}),
3123
replace({
3224
preventAssignment: true,
3325
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
@@ -56,6 +48,7 @@ const cjsBundleConfig = {
5648
file: 'dist/cjs/index.cjs',
5749
format: 'cjs',
5850
sourcemap: true,
51+
interop: 'auto',
5952
},
6053
}
6154

0 commit comments

Comments
 (0)