-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix: emit ESM with .mjs
#1038
fix: emit ESM with .mjs
#1038
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Unfortunately this project is not ready for |
@mariuslundgard this PR does not add |
@mariuslundgard Alternatively revert adding |
Yes, we'll need to revert |
Fwiw, I tested with Next.js before releasing and it worked fine for me. Will do some more testing to evaluate how I got it wrong. |
Yeah it's happened to me multiple times as well, especially while adding ESM to |
This means Next.js does not interpret packages the same way Node.js does. We should point this out to the Next.js team, since it potentially hinders Node ESM adoption. |
I'm not sure if that's the case. Adding |
I'm adding a change to |
This is from the Node spec, @stipsan:
|
Closing this PR in favor of aa51484 |
Adding
type: commonjs
in the package json without also updating the file endings used for ESM tomjs
broke environments such as NextJS.See:
Reproduced build outputs: https://vercel.com/sanity-io/nextjs-blog-cms-sanity-v3/4fr81igyWY9wnyLuUY4PcfHtCNGE