migration: remove vitePreprocess
or add @migration-task
to evaluate usage
see the discussion in sveltejs/cli#312
@bluwy @dominikg is vitePreprocess
used for anything besides typescript support?
Remove vitePreprocess
from the svelte config file or add @migration-task
instructing the user to evaluate its usage. It is primarily used for TypeScript support and I think that exists natively in Svelte 5 now so that preprocessors are no longer required?
nice to have
vite-plugin-svelte 4 defaults to script: false
for vitePreprocess and only uses it for style preprocessors. This is important for scss and any other postcss things the user might have that sveltes native css parser can't handle.
So you can only remove it if you are sure the user has not syntax in their svelte style blocks that would throw for svelte parse
Migration task comment is probably good, but for both ways: you can either remove it, or you need to add script: true
if your code uses TS syntax that isn't type only
Afaik you do need it for scss Edit: And I missed Dominik's post, saying the same
is the migration script able to determine if any typescript syntax was used that requires it? (i'd assume you can try to compile and if it gives a script syntax error you try again with vitePreprocess({script: true})
and if that fixes the error you add it in the migration....