-
Notifications
You must be signed in to change notification settings - Fork 207
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
NextJS incompatibility #332
Comments
yep, svelte-kit builds also broke on latest update (and they are "module" from start) broken build one: accidentally merged broken version it seems that ESM build isn't correct for now (or it's declaration in package.json) |
angus-c#332 removing that line will allow autodetect to work correctly. todo: more build targets available, see: https://github.com/pngwn/MDsveX/blob/master/packages/mdsvex/rollup.config.js
* fix module type detection #332 removing that line will allow autodetect to work correctly. todo: more build targets available, see: https://github.com/pngwn/MDsveX/blob/master/packages/mdsvex/rollup.config.js * replace-all Co-authored-by: angus croll <anguscroll@gmail.com>
Should be fixed now #334 |
@angus-c Sorry my absence, I had to stay offline yesterday the whole day... Curious to understand why nextjs was picking up ESM if the main type was specified to to commonjs. Anyhow, I'm glad it's fixed. I should've tested in all biggest frameworks (nuxt, next, vite, angular, node, etc) to ensure it's all working perfectly everything. My bad |
Hi @nosovk can you check with latest major build? It now uses .mjs suffix for esm module which should be more universally recognized |
@angus-c I checked just-shuffle, and it is working in sveltekit, so assumption is that all of em are working. Even I had the same problem with submodules, and renaming ESM outputs to .mjs helped, so all of just packages should also work |
Hey @angus-c 👋
Seems like the latest version of all the packages has introduced an incompatibility with NextJS apps.
Reproduce
yarn
yarn build
❌Possible solution
"commonjs"
to"module"
in package.jsonAfter the change to
"type": "module"
you can runyarn build
✅:The text was updated successfully, but these errors were encountered: