-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
React Fast Refresh #151
Comments
I guess this could be solved with this one #111 but it's more complex than that. As for reach refresh it requires more more work than plugins system, we would also need some api for hot updates so it might require this feature #21 to be finished as well. |
I'm not sure this makes sense as part of esbuild. First of all esbuild is focused on production builds, not development builds. I am also trying to avoid building in complicated custom transforms for various frameworks like this. For example, I'm not planning to replicate the compiler pipelines of Vue, Svelte, or Angular either. That's why the readme says "I'm not trying to create an extremely flexible build system that can build anything." In a world where esbuild has support for JavaScript plugins, it could potentially make sense to add this as a plugin. Or it could make sense to use esbuild's transform API to speed up another bundler that has React Fast Refresh support, and for people who want to use React Fast Refresh with esbuild to use that bundler instead. |
I'm going to close this because I believe the above answer is sufficient for this issue. It's true that someone could possibly write an esbuild plugin for this in the future, but I'm not going to keep issues open for each potential esbuild plugin. There are too many of them and it's not useful for me to track them in separate issues. This issue has already been linked to #111, the general issue for the plugin API, so it won't be lost. |
Since React Fast Refresh requires bundler specific work, I am creating this issue just to track this work. It's not high priority at all.
You mentioned you are planning for plugins in future. This would be a good candidate to test your plugin API design.
Here is a rough document for how to implement React Fast Refresh.
The text was updated successfully, but these errors were encountered: