svelte-intl-precompile icon indicating copy to clipboard operation
svelte-intl-precompile copied to clipboard

Svelte5 support

Open stalkerg opened this issue 1 year ago • 9 comments

Seems like we should replace storage by value.

stalkerg avatar May 20 '24 04:05 stalkerg

I need to take a look at the needed changes to support svelte 5

cibernox avatar May 20 '24 07:05 cibernox

yeah, the main change it's storage replaced by rune. Shouldn't be too much changes.

stalkerg avatar May 26 '24 04:05 stalkerg

Will be good to do this #66 during this support as well.

stalkerg avatar May 26 '24 04:05 stalkerg

Svelte5 is released. Any updates? Should I help, or should we start searching for a new library?

stalkerg avatar Oct 23 '24 09:10 stalkerg

Now that svelte5 is out I'll find some time to work on it. I haven't used svelte 5 new idioms a lot yet, so I need to get familiar with them first.

If anyone has used them for a while any input is welcomed.

cibernox avatar Oct 23 '24 09:10 cibernox

As I said, Svelte5 provided a universal reactive solution - $state(), which replaces Svelte4 Stores and component-level variables. I think we just should replace Store by $state, that's it.
Basically, import { t } from 'svelte-intl-precompile'; t here should state. As I understand, everything else can be kept as is. Of course, internally, you will work with the new $state a little bit differently, but it looks like nothing complicated.

But we definitely should also solve #66

stalkerg avatar Oct 24 '24 03:10 stalkerg

ok, I started working on this a bit. To make this better the changes are a bit more profound than that. Ideally.

A lot of the code is now unnecesarily complicated because in JS/TS files we had no reactivity, but now with $state being usable outside svelte components the codebase can be greatly simplified.

cibernox avatar Nov 01 '24 22:11 cibernox

Hi, Is there any update on the svelte 5 support?

zvikasdongre avatar Feb 16 '25 06:02 zvikasdongre

any update?

macmillen avatar Jun 17 '25 10:06 macmillen