-
Notifications
You must be signed in to change notification settings - Fork 18
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
Call compileModule
for .svelte.js
files in Svelte 5
#282
Comments
Hi @sebastianrothe, I hope you had a good weekend! Do you think you'll have time this week for these Svelte 5 PRs? I'm getting eager to ship proper Svelte 5 support in |
Yes, I am finally on it this evening. |
I need to figure out tomorrow, how to release a next-Release for you to test. |
Great! Let me know if I can help. For the time being, I'll try out a local build + tarball and report back |
I think you can also use the git repo and main branch as a version number. |
Unfortunately, due to the build step, this doesn't work. The GitHub repo has no
Everything is checking out locally on my end! In Svelte 5, I am now able to specify... {
transform: {
'^.+\\.svelte(?:\\.js)?$': 'svelte-jester',
},
} ...in Svelte 5 and the v5 syntax (runes) works outside Svelte components as expected |
Great, I will create a release with version number 5. |
Published as |
Howdy! I'm working on full Svelte 5 support over in @testing-library/svelte and I discovered that our suite fails with Svelte 5 + Jest +
svelte-jester
.In Svelte 5, we rely on the
$state
rune to be able to re-render the component under test. This logic is placed in a.svelte.js
file. However, if I try to send.svelte.js
files throughsvelte-jester
......Svelte becomes quite unhappy.
I gave
vite-plugin-svelte
a quick read, and discovered a new (to me) part of the transformation pipeline. It looks like there's a new compiler function -compileModule
- used to compile.svelte.js
files.TL;DR: svelte-jester should probably know how to call
compileModule
for Svelte 5 support.I've got a very rough proof-of-concept locally that adds enough support to get our test suite passing. Is this something you'd accept a PR for?
The text was updated successfully, but these errors were encountered: