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 module export #821
base: v3
Are you sure you want to change the base?
ESM module export #821
Conversation
Repo is copied from #816 inside to test in future
fix(async): bundler esm import fix(core-v1): bundler esm import fix(core): bundler esm import fix(effects): bundler esm import fix(eslint-plugin): bundler esm import fix(form-web): bundler esm import fix(form): bundler esm import fix(framework): bundler esm import fix(hooks): bundler esm import fix(jsx): bundler esm import fix(lens): bundler esm import fix(logger): bundler esm import fix(npm-cookie-baker): bundler esm import fix(npm-history): bundler esm import fix(npm-lit): bundler esm import fix(npm-react): bundler esm import fix(npm-solid-js): bundler esm import fix(npm-svelte): bundler esm import fix(npm-vue): bundler esm import fix(persist-web-storage): bundler esm import fix(persist): bundler esm import fix(primitives): bundler esm import fix(react-v1): bundler esm import fix(testing): bundler esm import fix(timer): bundler esm import fix(undo): bundler esm import fix(url): bundler esm import fix(utils): bundler esm import fix(web-fetch): bundler esm import fix(web): bundler esm import Reatom used to use package.json#module field to declare esm modules. Turns out it was only in draft spec and never was standardized. So instead of relying on non-standard behaviour we use .mjs which is standard nodejs mechanizm. Should fix #816 #806 #573
Run & review this pull request in StackBlitz Codeflow. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Initial confusion is likely to be caused by how microbundle handles ESM building by assuming everything in package.json#module is ESM. But now it checks for package.json#type also. |
How esbuild read package.json |
@BANOnotIT if this is ready - merge it. |
This PR should closes #816, #806, and #573
Auxiliary materials: