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

Implement optional svelte-hmr support #24

Open
Valexr opened this issue Jan 23, 2021 · 7 comments
Open

Implement optional svelte-hmr support #24

Valexr opened this issue Jan 23, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@Valexr
Copy link

Valexr commented Jan 23, 2021

rixo/svelte-hmr - https://github.com/rixo/svelte-hmr
intrnl/vite-plugin-svelte - https://github.com/intrnl/vite-plugin-svelte/blob/trunk/lib/index.js (like example)

@Valexr Valexr changed the title What do you think about implement svelte-hmr & svelte-preprocess by default? What do you think about implement svelte-hmr by default? Jan 23, 2021
@EMH333
Copy link
Owner

EMH333 commented Jan 23, 2021

Hmm, I think that would be very helpful! I'm a bit overwhelmed at the moment so this will have to go on the backlog for now. You are welcome to open a PR!

@EMH333 EMH333 added this to the v1.0.0 milestone Jan 23, 2021
@EMH333 EMH333 added the enhancement New feature or request label Jan 23, 2021
@Valexr
Copy link
Author

Valexr commented Jan 24, 2021

Svelte-HMR have a many operations in JS... think it’s may doing esbuild slowed..🤔 & I’m not sure how it’s implementing properly... but may be I will try 🤓

@Valexr Valexr closed this as completed Jan 24, 2021
@Valexr Valexr reopened this Jan 24, 2021
@Valexr Valexr closed this as completed Jan 24, 2021
@EMH333
Copy link
Owner

EMH333 commented Jan 24, 2021

I'm actually going to reopen this issue because I want to track people's interest. When I have time, this would be a good weekend project, if you don't get to it first.

@EMH333 EMH333 reopened this Jan 24, 2021
@Valexr
Copy link
Author

Valexr commented Jan 24, 2021

👌🏻Optional HMR may be good 🤓

@alexanderniebuhr
Copy link

Would be great to have. Sadly, do not have free time atm too. but could help with it

@EMH333 EMH333 changed the title What do you think about implement svelte-hmr by default? Implement optional svelte-hmr support Jan 7, 2023
@EMH333
Copy link
Owner

EMH333 commented Jan 7, 2023

In the interest of heading towards a v1.0.0 release for this plugin, I'm going to remove this as a blocker for that milestone because esbuild doesn't support HMR fundamentals at the moment (see evanw/esbuild#97). I'll continue to leave this issue open since it looks like this is a popular request. Once the upstream support is there, I can take another look. I took a very very very hacky stab at HMR runtime support and it didn't seem too crazy.

@EMH333 EMH333 removed this from the v1.0.0 milestone Jan 7, 2023
@wathhr
Copy link

wathhr commented May 16, 2024

I think HMR would be a worthwhile addition as, in my opinion, this is whatis holding esbuild back the most. HMR would be a great addition to have for DX, just look at vite. This could be useful to take a look at on how this would be implemented: https://github.com/remorses/bundless/blob/master/plugins/svelte/src/index.ts

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

No branches or pull requests

4 participants