This should be relatively straightforward with the migration script: https://svelte.dev/docs/svelte/v5-migration-guide#Migration-script