Skip to content

fix: add ESM exports for Vite 8 compatibility#142

Merged
Kikobeats merged 1 commit intomicrolinkhq:masterfrom
jc-louis:fix/vite8-esm-compat
Mar 16, 2026
Merged

fix: add ESM exports for Vite 8 compatibility#142
Kikobeats merged 1 commit intomicrolinkhq:masterfrom
jc-louis:fix/vite8-esm-compat

Conversation

@jc-louis
Copy link
Contributor

Vite 8 changed CJS interop behavior — without __esModule: true or an exports field, the default import resolves to the whole module.exports object instead of .default. Add an ESM wrapper (index.mjs) and conditional exports field in package.json so bundlers correctly resolve the default import.

Closes #141

Vite 8 changed CJS interop behavior — without `__esModule: true` or an
`exports` field, the default import resolves to the whole module.exports
object instead of `.default`. Add an ESM wrapper (`index.mjs`) and
conditional `exports` field in package.json so bundlers correctly
resolve the default import.

Closes microlinkhq#141

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 16, 2026

@jc-louis is attempting to deploy a commit to the Microlink Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-json-view Ready Ready Preview, Comment Mar 16, 2026 5:52pm

Request Review

@Kikobeats Kikobeats merged commit 865d2f8 into microlinkhq:master Mar 16, 2026
3 checks passed
@Kikobeats
Copy link
Member

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default import broken with Vite 8 (CJS interop change)

2 participants