Skip to content

Commit 3ffa936

Browse files
committed
fix: suppress mixed export warnings if cjsDefault is enabled
closes #284
1 parent d4f08df commit 3ffa936

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/features/rolldown.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ export async function resolveInputOptions(
164164
...(shims && !cjsDts && getShimsInject(format, platform)),
165165
},
166166
moduleTypes: loader,
167+
onLog: cjsDefault
168+
? (level, log, defaultHandler) => {
169+
// suppress mixed export warnings if cjsDefault is enabled
170+
if (log.code === 'MIXED_EXPORT') return
171+
defaultHandler(level, log)
172+
}
173+
: undefined,
167174
},
168175
config.inputOptions,
169176
[format, { cjsDts }],

0 commit comments

Comments
 (0)