zodern / melte

Svelte compiler for Meteor with built in tracker integration and HMR
MIT License
33 stars 14 forks source link

Svelte 4? #30

Open thoennes opened 1 year ago

thoennes commented 1 year ago

Possible?

Sergeant61 commented 12 months ago

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 commented 8 months ago

There's two issues with supporting svelte 4:

thoennes commented 8 months ago

Is there anything I could do to help?

-- unreal

On Thu, 21 Mar 2024 at 7:51 AM, zodern @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/zodern/melte/issues/30#issuecomment-2010600499, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL5S3ZLVEUB5V5KRDUMOYDYZHZEVAVCNFSM6AAAAAA62V6SIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJQGYYDANBZHE . You are receiving this because you authored the thread.Message ID: @.***>

NigelCunningham commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

petr24 commented 3 months ago

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

thomastraum commented 2 months ago

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

zodern commented 2 months ago

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 https://github.com/meteor/meteor/discussions/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 commented 2 months ago

@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 commented 2 months ago

thats cool!

thoennes commented 1 month ago

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 :)