Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: drop CJS build preserving compatibility#793

Merged
gioboa merged 1 commit into
mainfrom
remove/cjs
Jun 9, 2026
Merged

chore: drop CJS build preserving compatibility#793
gioboa merged 1 commit into
mainfrom
remove/cjs

Conversation

@gioboa

@gioboa gioboa commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This is not a breaking change because:

  • It drops the CommonJS build and publishes the package as ESM-only, while keeping CommonJS consumers working on Node versions that support require(esm): Node ^20.19.0 or >=22.12.0.
  • It aligns package exports and build output to .js/.d.ts, removes stale CJS output paths, and centralizes ESM-native module resolution through import.meta.resolve.
  • It also keeps user project compatibility for .cjs/.mjs/.mts inputs, meaning consumers can still use CJS config/files, ESM .mjs/.mts sources, and CJS/ESM remote/shared dependencies; only this package’s published build output drops CJS.

@pkg-pr-new

pkg-pr-new Bot commented Jun 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@module-federation/vite@793

commit: 0bce4ce

@gioboa gioboa force-pushed the remove/cjs branch 3 times, most recently from 34ee36a to 6b1ce1e Compare June 9, 2026 11:53

@gioboa gioboa left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests With Different Frameworks

Screenshot 2026-06-09 at 14 28 34

@gioboa gioboa changed the title chore: drop CJS build keep compatibility chore: drop CJS build preserving compatibility Jun 9, 2026
@gioboa gioboa merged commit 8fa83f3 into main Jun 9, 2026
22 checks passed
@gioboa gioboa deleted the remove/cjs branch June 9, 2026 12:33
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.

1 participant