opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
22 stars 0 forks source link

Paraglide-SvelteKit Parse error when using incompatible svelte versions #133

Closed testvinder closed 1 month ago

testvinder commented 1 month ago

When I upgrade @inlang/paraglide-sveltekit from 0.6.23 to any newer version I get this error:

[plugin:vite-plugin-svelte] Error while preprocessing /home/user/webApp/src/lib/Components/Lister/Filters.svelte - [@inlang/paraglide-sveltekit] Failed to parse /home/user/webApp/src/lib/Components/Lister/Filters.svelte. 
This may be because you are using a signifficantly newer version of the "svelte" package. 
Try forcing "@inlang/paraglide-sveltekit" to use your version of "svelte" using pnpm overrides

I'm using the latest stable version of Sveltekit (2.5.10) and Svelte (4.2.17).

Could it have something to do with this change 0.7.0 3e9b863: Use Svelte 5 compiler in the preprocessor for rewriting links

LorisSigrist commented 1 month ago

This error mistakenly gets triggered when there is a Syntax error in your .svelte file.

I updated the behavior so that Paraglide-SvelteKit's preprocessor now logs a warning and No-ops when a syntax error is encountered.

testvinder commented 1 month ago

Thank you!