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

Make Elmish.Hmr support Webpack, Parcel, Vite #29

Closed
MangelMaxime opened this issue Jul 7, 2021 · 5 comments
Closed

Make Elmish.Hmr support Webpack, Parcel, Vite #29

MangelMaxime opened this issue Jul 7, 2021 · 5 comments
Assignees

Comments

@MangelMaxime
Copy link
Member

Different bundler seems to offer different API with a few minor difference.

See #28 and fable-compiler/fable3-samples#10 (comment)

@alfonsogarciacaro
Copy link
Contributor

@MangelMaxime I managed to make Elmish.HMR compatible with both Webpack and Vite/Snowpack for Fable.Lit. If it's ok with you, I can send a PR to add similar changes here, although my solution is not Lit-specific so it'd be nice to have a common Elmish.HMR that's not dependent on a specific renderer.

I didn't deal with the Navigation issue though. I think we can use hot.dispose to remove the old subscriptions, but probably patching all potential Program extensions with subscriptions is not scalable. If termination capabilities were added to Elmish as discussed here, Elmish.HMR could terminate the "old" program and each extension should be responsible of cleaning up after themselves.

@MangelMaxime
Copy link
Member Author

@alfonsogarciacaro

I am going to work on this issue (I was waiting to finish Nacara v1 before doing a round of maintenance across my different projects).

I need to refactor the repository structure to make the maintenance easier and also have demo project to tests the different bundler, etc.

@MangelMaxime
Copy link
Member Author

@alfonsogarciacaro Not trying to spam you :)

But as I am not sure if you saw my notification from #30, I am pinging you here too.

Can you please have a look at my comments from #30 I have some problem with Vite HMR

@alfonsogarciacaro
Copy link
Contributor

Weird, I did miss the notification indeed 😕 Thanks for letting me know! I'll reply in the PR 👍

@MangelMaxime
Copy link
Member Author

Done in #30

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

2 participants