-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
uvu with svelte #122
Comments
Thanks
No because the The ESM --loader hook API is still experimental, but exists. I don't recommend experimental APIs so there's no example of it, but you're welcome to try & piece it together yourself :) Circle back with a TLDR if you decide to go this route. Hope that helps a bit |
Hi @jerrythomas @lukeed, I've done some starter work on using ESM loader hooks for this: https://github.com/brev/esm-loader-svelte My ESM-only testing of SvelteKit with UVU is now working decently. Svelte component imports are compiled. CSS/PostCSS style imports are no-op instead of failing. JSON imports can be done with another experimental node flag. |
Just updated npm to a new version, it now also does preprocessing. |
Uvu makes it painless to test ESM modules without the -r esm.
However, the svelte example still suggests using
-r esm and -r tests/setup/register.js
.Whe I try to use it I get the error below
Is there a way that svelte testing can be done without the
require
?The text was updated successfully, but these errors were encountered: