-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Svelte 5 support #124
Comments
Should be straightforward, just waiting on a stable 5.0.0 release as it's still in beta :) |
@woutdp what about now its on rc? i'm trying to explore the phoenix ecosystem with livesvelte. |
I'd rather wait a bit until it's officially released. It seems there's some breaking changes and not a straightforward upgrade and I want to avoid having to fix them twice if anything changes again in the stable version. I will accept PR's that implement the RC though, if anyone is up for it. I'd be happy to merge and push a new version. |
i think it should be updated to v4 first if the dependencies was still v3.56, as in the blog said :
|
We're already on v4.
I'd like to follow Svelte's official recommendation, as soon as v5 is stable, I'll make the change. And like mentioned if there's interest in getting this out sooner, I'm accepting PR's! |
I managed to have it running without SSR, which for me is fine and unlocks development until we've stable support. :D Here's the steps I took: Disable SSR, as in the README (https://github.com/woutdp/live_svelte/blob/master/README.md#requirements). I just commented out the Node SuperVisor line. In plugins: [
importGlobPlugin(),
sveltePlugin({
preprocess: sveltePreprocess(),
compilerOptions: {dev: !deploy, hydratable: true, css: "injected", compatibility: {componentApi: 4}},
}),
], Tweak assets/package.json to use svelte 5 (you may need to run npm install --force) For example my devDependencies look like this: "devDependencies": {
"esbuild": "^0.16.17",
"esbuild-plugin-import-glob": "^0.1.1",
"esbuild-svelte": "^0.8.1",
"svelte": "5.0.0-next.220",
"svelte-preprocess": "^6.0.2"
}, |
I've been looking at this today since Svelte 5 was just released officially. We'll need to wait until it's supported by |
Hi @woutdp eagerly waiting for default svelte5 support 💯 |
Waiting for new update |
Hi @woutdp , just got confirmation that |
It says:
I think we do need support for |
@woutdp if so look like it ready https://github.com/EMH333/esbuild-svelte/releases/tag/v0.9.0 |
Just leaving an update here because people are eager for this. Just looked at it again and didn't get it to work yet, will work on it some more tomorrow. Progress can be tracked on the |
Another try today. Made some progress on converting the
Hello world Will trigger this error message. But: <div>Hello world</div won't trigger this. That triggers the following error:
And then in some cases I get:
For example on the breaking news component. So not sure what's going on with this. I've tried using Progress can be tracked on a very dirty branch |
Hey I managed to get most everything working. The errors with the operations and others you are seeing seems to be because of multiple svelte runtimes being bundled. At least that is the conclusion I came to. I have a branch here https://github.com/ElijahJohnson5/live_svelte/tree/svelte-5 where I think all of the examples are working but I can't seem to get the props updating to work nicely (without looping through the props every time) The change that fixed the Let me know if this is makes any sense. I am happy to help with this more! (I helped get the svelte 5 support for |
@ElijahJohnson5 I'm not too woried about looping through the props as I expect people to not have too many props, and if they do have them they would probably put them in a map, and a map gets updated properly it seems :) |
That's awesome to hear! Happy to help with anything else you may run into |
I've just released a release candidate version for Svelte 5 support. This is what's on the current Test guide for
|
Looks like some of the props are messed up from my testing. Same with on the LiveJson page. I am pretty sure the |
For the props that don't work, would it be possible to make a specific component in the example_project so I can test it? |
Sure I will try making one. An easy example is in any of the counter pages if you just duplicate the component you will see weird stuff with the values changing only for the second component. The component I was playing around with in my own code was something like
Where the messages were not getting updated when switching rooms because the |
Thank you for the info, was able to reproduce and I think it's fixed now, please feel free to test again New version available: |
New version available: Some minor tweaks but mostly the same as previous version. This is hopefully the version that goes out as |
New version: Trying to integrate it with a project now, but hitting an issue when trying to import a component from a parent component. Not hitting this same issue in the
Not sure what's going on here but will continue investigating |
I continue getting this error error with deadviews with the new update if I do this
and encapsule my layout with this
and in a regular liveview do this
my svelte view is this
the age don't update till i do this
|
Wondering how difficult would it be to migrate to Svelte 5.
Loving the idea here so far, keep improving!
The text was updated successfully, but these errors were encountered: