-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(nextjs): Prefer esm/index.server.js over CJS version
#16144
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
base: develop
Are you sure you want to change the base?
Conversation
esm/index.server.js over CJS versionesm/index.server.js over CJS version
|
Hey @mischnic thanks for opening this PR! To assess priority: Is the current exports declaration blocking you in some way? Could you elaborate a bit more what the specific issue is that this PR solves? Thanks! I started our CI so that we check if our NextJS E2E tests are still passing. Unfortunately, exports changes are always a bit risky. Also gonna ask @chargome to review |
|
Sorry for the short description, this is the fix for #16121 as with this change, importing |
|
Closing, as this seems to be resolved on the Vercel side. If I misunderstood this feel free to re-open! |
|
Yeah, this is still relevant, I talked to Charly in the meantime as well. |
This makes bundlers prefer the ESM version of
index.server.js, for better tree shaking, as ESM reexports can be statically analyzed and skipped when not needed, unlike the CJS versionThe ESM versions are already listed first for the edge versions