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

feat(hmr): Use HMR in Deno 1.38 to create HMR in Ultra #285

Open
cdoremus opened this issue Nov 10, 2023 · 1 comment
Open

feat(hmr): Use HMR in Deno 1.38 to create HMR in Ultra #285

cdoremus opened this issue Nov 10, 2023 · 1 comment

Comments

@cdoremus
Copy link
Contributor

Hot module replacement was just added to the Deno runtime in version 1.38. This should be leveraged to implement HMR in Ultra.

@cdoremus
Copy link
Contributor Author

cdoremus commented Nov 10, 2023

The Deno team has repeatedly said that it plans to use this feature to give Fresh client-side HMR and yesterday it gave a hint on how they will do it. In essence, they suggest listening to the "hmr" event and capturing the Event.detail value that contains the path to the file that changed and triggered the event, and sending that information to the front end that would cause a reload of that file (or perhaps the page that uses that file).

To see that demo on the livestream that discussed using the "hmr" event, take a look at: https://youtu.be/5tUDSrnHFPk?t=1857

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

1 participant