-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Make it compatible with Node's ESM imports. #4806
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
Comments
Would adding |
Starting with Node v12 if the file ending is I could dig in to see how we can make it work, but I need to know if we can also change how the |
Not sure what to do, but there's also an issue when fetching the package via Pika, mostly when using Deno. If I have code like this: import compile from 'https://cdn.pika.dev/svelte@^3.23.0'; There is an issue when resolving files and types:
I tried to allow exporting the compiler to ESM via #4972 , and when I do this on my machine and |
This is also an issue with Webpack 5. Because it now follows strict ESM import rules, you get a bunch of errors from Svelte imports like this:
Currently to get Svelte to work in Webpack 5 you have to completely disable strict ESM imports. |
Svelte provides the |
Currently if I run a compiled svelte app in
esm
format on node for SSR I get the following error:node --experimental-modules --experimental-json-modules --es-module-specifier-resolution=node svelte.app.mjs
(node v14)To fix that issue I added
type: "module"
tonode_modules/svelte/package.json
, but thesvelte/compiler
is compiled inumd
format and throws an error:Can we change how
svelte/compiler
is built, to something similar tosvelte/internal
?The text was updated successfully, but these errors were encountered: