Skip to content

Commit 9381349

Browse files
committed
build: only enable esModule compat for cjs builds
1 parent e077e6f commit 9381349

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rollup.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ function createConfig(format, output, plugins = []) {
104104
const isCompatBuild = !!packageOptions.compat
105105

106106
output.exports = isCompatPackage ? 'auto' : 'named'
107-
output.esModule = true
107+
if (isNodeBuild) {
108+
output.esModule = true
109+
}
108110
output.sourcemap = !!process.env.SOURCE_MAP
109111
output.externalLiveBindings = false
110112

0 commit comments

Comments
 (0)