-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
SvelteKit 2.0 breaking "tabulator-tables" import statement #12185
Comments
the package in question does not have see https://publint.dev/tabulator-tables@6.2.1 and also https://antfu.me/posts/publish-esm-and-cjs opening your reproduction in stackblitz shows a different error https://stackblitz.com/github/thisjt/tabulator-import-issue?file=README.md (looks like building an error stacktrace broke) This is very unlikely to be caused by sveltekit. On the offchance it is, please provide a reproduction that shows tabulator-tables 6.0 working in sveltekit@1, not working in sveltekit@2 and also working in a generic vite 5 js project. sveltekit is an esm first framework, and personally i would recommend using dependencies that also share this spirit. |
I have inform the author with your suggestions. I'm currently waiting for his reply. As of now, I have replicated the package working fine as is in sveltekit@1.5. I'm not sure if I'm doing the barebones vite@5 right but the importing is also working fine there. For sveltekit@2 I'm getting the same error as what you saw when trying to import the package so not sure what's up with that. Sveltekit@1.5 barebones repro https://stackblitz.com/edit/vitejs-vite-pqilhv |
@thisjt please check Vite 5 with the vanilla SSR template from https://github.com/bluwy/create-vite-extra Some issues with vite only show up in SSR which is not in the default template |
We can close this issue now. This has been fixed as per PR olifolkerd/tabulator#4490 from the package |
Describe the bug
Importing the package "tabulator-tables" throws an error saying that it's a CJS module and it should be imported in a specific way. On SvelteKit 1 this importation is working fine as is but the issue started to happen when I upgraded to SvelteKit 2. This could also potentially be an issue with Vite but so far this issue is only happening for SvelteKit 2 and not on other frontend frameworks.
Here's the import code
This is currently my workaround for this issue
Here's the bug report that was opened on tabulator-tables. The author stated that it should work properly as is and it's weird that this is happening specifically only on SvelteKit.
olifolkerd/tabulator#4378
Here's the output of the issue
Reproduction
Here's a repo with the minimum reproducible issue:
https://github.com/thisjt/tabulator-import-issue
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: