-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
[BUG] Issues in combination Sveltekit #573
Comments
In an another, plain Svelte project the importing / bundling works fine... |
Example in a sandbox REPL here: |
Douno. Did you use the last version of vite, the kit and so on? |
Here is the same issue sveltejs/kit#7363 |
@mindreframer try |
Hmm... On NPM I see only 3.1.0... Also, here is the repo - https://github.com/mindreframer/reatom-sveltekit-issue. Update did not change the error message locally |
I think reatom is currently not compatible with vite@5, because it now only support esm packages. EDIT: with a bit of digging in, I can confirm the compatible issue and it is relatively easy to fix on reatom side. Just add |
@nightire But how |
@BANOnotIT I don't know what changed behind the scenes; I just have tried everything to make vite@5 work. It's easy to try yourself: bootstrap a vite@5 project, install Reatom, and run it to see the error. Then, overwrite the package.json files in the EDIT: Because of the exports field, modules belonging to Reatom should be fine. However, third-party modules directly dependent on reatom still need the Again, that's my best guess, but it did works for me. |
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
* test: add reproduction repo for module export Repo is copied from #816 inside to test in future * fix(all-settled): bundler esm import 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 * fix(new-package-template): use mjs in module export * test: implement cjs and esm check test * chore: install test files
pull request #821 test: add reproduction repo for module export Repo is copied from #816 inside to test in future fix(all-settled): bundler esm import 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 fix(new-package-template): use mjs in module export test: implement cjs and esm check test chore: install test files
The changes from the PR is finally published, please, recheck your problem <3 |
Hey @artalar , thanks for this cool library!
I would like to try it in combination with Svelte. For testing I started using it with sveltekit scaffold and it complaints when I try to render it.
There seems to be an issue with "@reatom/framework" re-exports...
Repo with reproduction:
Is this a known issue? Some configuration settings to fix it?
Thanks!
The text was updated successfully, but these errors were encountered: