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

Add support to React Refresh #141

Open
gaetan-puleo opened this issue Jun 7, 2024 · 3 comments
Open

Add support to React Refresh #141

gaetan-puleo opened this issue Jun 7, 2024 · 3 comments

Comments

@gaetan-puleo
Copy link

gaetan-puleo commented Jun 7, 2024

React refresh is not working when using @hono/vite-dev-server and vite-react-plugin.

To make it works, we should transform the HTML with viteServer.transformIndexHtml(req.url, html)

https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react

@gaetan-puleo
Copy link
Author

It could be possible to do it here
https://github.com/honojs/vite-plugins/blob/main/packages/dev-server/src/dev-server.ts#L168

The issue is we are using Stream here.

@gaetan-puleo
Copy link
Author

As a workaround take a look here.
#142 (comment)

@gaetan-puleo
Copy link
Author

We can close the issue if you want @yusukebe or we can wait for an "official way" to do it.

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