Closed Shrumpf closed 1 year ago
I added a SvelteKit demo app in this repository, the solution is described in the readme as well: https://github.com/tsparticles/svelte#sveltekit
I got the same error and I solved it changing the vite.config.ts
file like this:
After updating my project I get the exception
Cannot use import statement outside a module
. I couldn't find the exact problem, but this is a standard SvelteKit project on the latest versions and it doesn't work.Reproduce: https://replit.com/@Shrumpf/Particles
It doesn't happen everytime, sometimes the error shows up after changing the page and after switching back it works.
Probably I just use it the wrong way, but maybe someone has an idea.