-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cannot use import statement outside a module: blocking package upgrade #10139
Comments
This is a bug in the packaging of that library. They are shipping |
that is because it is not an ESM, the reason I do not transpile unfortunately there is nothing much I can do, other than hoping for bundler able to deal with |
update: after giving it some thoughts, my guess is, if build tools can resolve I tested both non ESM and ESM results:
I want to keep the non ESM because it works with most build tools but I can give up but how can I solve the “Directory import is not supported resolving ES modules” error, @Conduitry? Should I open a new issue or continue it here or #612? |
I would imagine that instead of importing from |
@ghostdevv if I fix this, there will be a new one I need to go to Currently my best option is to release Non ESM package with import statement because it is compatible with most build tools (as shown in my previous comment) but since CommonJS package works with svelte kit. This surprised me because CommonJS does not works with other build tools (it will break them, see firebase fked up) Should I release a CommonJS variant only to support svelte kit users? Maybe, but I prefer svelte kit solves this issue, this will make not only me, but also others library author job easier |
Describe the bug
Cannot use Firelord in a Sveltekit project but can use it in a pure Svelte-only (not Sveltekit) project.
Since Firelord works with pure Svelte, React and a few other frameworks this clearly seems like a blocking Sveltekit issue -- most likely blocking a few libraries, not just Firelord.
Reproduction
Reproduction steps:
npm i && npm run dev
Alternative:
npm create svelte@latest
(select Skeleton app)npm i [email protected]
+page.svelte
file:Working pure Svelte-only (no Sveltekit) repo:
Logs
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: