Skip to content
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 4? #30

Open
thoennes opened this issue Nov 2, 2023 · 12 comments
Open

Svelte 4? #30

thoennes opened this issue Nov 2, 2023 · 12 comments

Comments

@thoennes
Copy link

thoennes commented Nov 2, 2023

Possible?

@Sergeant61
Copy link

Hello, I'm wondering too, I tried it recently but it couldn't get the project up and running. It's even coming in Svelte 5, can we consider that too? I would like to help with this but I'm not sure how?

@zodern
Copy link
Owner

zodern commented Mar 20, 2024

There's two issues with supporting svelte 4:

  • It requires a newer version of Node, which requires Meteor 3
  • It requires Meteor's resolver to support the exports field in package.json files, which has not been implemented

@thoennes
Copy link
Author

thoennes commented Mar 27, 2024 via email

@NigelCunningham
Copy link

Thanks for your work!

I've successfully upgraded to Meteor 3, but trying to then upgrade to Svelte 4 gets me no errors but no content loaded. Would that be due to the issue mentioned above "It requires Meteor's resolver to support the exports field in package.json files, which has not been implemented"?

@zodern
Copy link
Owner

zodern commented May 13, 2024

I'm not sure. My understanding is svelte 4 won't work in bundlers that don't support the exports field. Though svelte 4 also changed the compiler api and I haven't updated melte.

@NigelCunningham
Copy link

Thanks for the reply. Wish I could help but I'm no expert in these things.

@petr24
Copy link

petr24 commented Aug 23, 2024

What would it take to get Svelte 4.x working now that Meteor has released V3 & considering we have vite support as well.

@thomastraum
Copy link

thomastraum commented Sep 8, 2024

interested too. would love to use libs like https://www.shadcn-svelte.com/

@zodern
Copy link
Owner

zodern commented Sep 8, 2024

What would it take to get Svelte 4.x working now that Meteor has released V3 & considering we have vite support as well.

To support svelte 4 with isobuild, we need:

  1. Update zodern:melte to support the svelte 4 compiler api (in addition to the svelte 3 api)
  2. Test svelte 4 and see if it works
  3. We probably need Feature: Support package.json exports fields meteor/meteor#11727
  4. (optional) we eventually also need Meteor to support the svelte field in package.json files

To support svelte 4 with vite:

  1. Extract the melte processor into an npm package that can be used with vite
  2. We probably still need to support isobuild for the packages that use svelte

@petr24
Copy link

petr24 commented Sep 10, 2024

@zodern

I went ahead and added vite, removed this package, and svelte 4 works out of the box.

I obviously lose the svelte/meteor integration with $m, but Tracker.autorun works just fine for subscriptions and queries.

If I have some time this weekend, I'll play around with this and see how easily I can get this working to get back $m syntax.

@thomastraum
Copy link

thats cool!

@thoennes
Copy link
Author

Any progress? I'm right at a point where I have time to help and a good place in my app development process to move from 3 to 4: new features competed, bugs fixed, but no release date constraints :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants