You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying out Svelte 5 on a fairly sized project and got blocked by this problem. I am migrating a writable store to a little API wrapping some state with the $state rune, however, if I define the object in a thing.svelte.ts file the app crashes on an error stating that $state is not defined. I suspect this has something to do with how webpack bundles these files together with different, since the same store works fine when defined within a regular Svelte file.
I am using swc to build ts and js files and the latest svelte compiler to build the svelte files. I've put up a minimal reproduction project here https://github.com/egilsster/runes-repro
It's my best guess that the problem lies within svelte-loader.
The text was updated successfully, but these errors were encountered:
Have you tried to add svelte-loader for svelte.js files also so it runs the compiler? I don't think anything else except svelte compiler understands that magic. 😁
Trying out Svelte 5 on a fairly sized project and got blocked by this problem. I am migrating a writable store to a little API wrapping some state with the
$state
rune, however, if I define the object in athing.svelte.ts
file the app crashes on an error stating that$state
is not defined. I suspect this has something to do with how webpack bundles these files together with different, since the same store works fine when defined within a regular Svelte file.I am using
swc
to build ts and js files and the latest svelte compiler to build the svelte files. I've put up a minimal reproduction project here https://github.com/egilsster/runes-reproIt's my best guess that the problem lies within
svelte-loader
.The text was updated successfully, but these errors were encountered: