-
-
Notifications
You must be signed in to change notification settings - Fork 773
fix: use module condition and main fields for bundling
#3886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughRemoved explicit mainFields configuration from Rolldown and Rollup, added "module" to default export conditions in the resolver, filtered out "module" in Vite externalConditions, and removed hardcoded exportConditions from the standard preset to rely on the centralized defaults. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Daniel Roe <daniel@roe.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/build/rolldown/config.ts(0 hunks)src/build/rollup/config.ts(0 hunks)src/build/vite/env.ts(1 hunks)src/config/resolvers/export-conditions.ts(1 hunks)src/presets/standard/preset.ts(0 hunks)
💤 Files with no reviewable changes (3)
- src/build/rolldown/config.ts
- src/build/rollup/config.ts
- src/presets/standard/preset.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: tests-rollup (windows-latest)
- GitHub Check: tests-rollup (ubuntu-latest)
- GitHub Check: tests-rolldown (windows-latest)
commit: |
Before runtimes adopting ESM, bundlers and package authors made up a convention to use top level
modulefield to indicate bundler-friendly-ESM entry. This convention then confused and added to theexportsobject as an export condition.Neither of the export condition or field is respected by any runtime but only by bundlers. Standard is the
exportsfield andimportcondition.This PR adds
moduleto default conditions to be consistent with rolldown and esbuild (rolldown/rolldown#4703) and fixing bundling issues.