-
Notifications
You must be signed in to change notification settings - Fork 99
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
ESM entrypoint isn't functional #260
Comments
Thanks for reporting this! This sounds like a regression to me. I’m not in office until beginning of next week, but will take a look then. |
Released a pure ESM version in https://github.com/blitz-js/superjson/releases/tag/v2.0.0, let me know if that works for you! |
I'm currently assessing whether this breaks something or not in my app, but what's sure is that esbuild now properly leverages ESM for I believe going ESM-only is the right move for most libs, otherwise people would rarely have any real incentive to move away from CJS. Anyway, thanks a lot for your quick reaction and fix! I'll open another issue if I stumble upon other problems. |
The files in
dist/esm
are not valid ESM because:package.json
with{ "type": "module" }
in it, OR files use a.js
extension instead of.mjs
(since the closestpackage.json
states the package is using CJS)This causes esbuild (for my case) and maybe other bundlers to discard this entrypoint and fallback to the CJS one instead (TypeScript resolution also points towards the CJS entrypoint, even when consumed from ESM code).
Do you think you might be able to fix the entrypoint to make ESM code able to consume ESM from your package as well? 🙏
The text was updated successfully, but these errors were encountered: