Closed JonathonRP closed 1 month ago
the same error happens on the svelte5 playground
one of the breaking changes in vite-plugin-svelte@4 is that vitePreprocess no longer preprocesses typescript by default
as svelte5 parser is supposed to understand it natively.
As a workaround you can try to change your svelte config to use vitePreprocess({script: true})
to reenable it and see if it works then.
The initializer for validate seems what breaks it, are you sure that <typeof errors>
is the right way to describe this?
It would be great if you could provide a minimal reproduction of the syntax you expect to work and demonstrate how it works in svelte4 and svelte5 with preprocessing ts but not in svelte5 without preprocessing ts.
Thanks
You can also change to use {} as typeof errors
for the type assertion, it looks like that works
@dominikg you can close this apparently it's a known issue with svelte 5 TS that
Next time please link the issue in the original report. I spent time analyzing this that i could have spent improving something else for everyone.
Describe the bug
upgrading sveltekit project to use latest vite-plugin-svelte ts files do not compile
Reproduction URL
https://github.com/JonathonRP/Finanzen/tree/dev
Reproduction
run repo locally, and get build errors
Logs
No response
System Info