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

@vitejs/react-refresh (React Fast Refresh) breaks hydration #12528

Open
1 task
tarosbubbletea opened this issue Nov 26, 2024 · 1 comment
Open
1 task

@vitejs/react-refresh (React Fast Refresh) breaks hydration #12528

tarosbubbletea opened this issue Nov 26, 2024 · 1 comment
Labels
needs response Issue needs response from OP

Comments

@tarosbubbletea
Copy link

tarosbubbletea commented Nov 26, 2024

Astro Info

Astro                    v4.16.14
Node                     v22.2.0
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/react

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Transform failed with 3 errors:
C:/Users/taro/Downloads/skeletal/src/pages/_fuzzyoverlay.tsx:1:820: ERROR: The symbol "inWebWorker" has already been declared
C:/Users/taro/Downloads/skeletal/src/pages/_fuzzyoverlay.tsx:1:916: ERROR: The symbol "prevRefreshReg" has already been declared
C:/Users/taro/Downloads/skeletal/src/pages/_fuzzyoverlay.tsx:1:935: ERROR: The symbol "prevRefreshSig" has already been declared

Installing and enabling the React Fast Refresh plugin for Vite causes the previous error when marking components for hydration on an Astro page

What's the expected result?

Expect for the components to load.

Link to Minimal Reproducible Example

https://stackblitz.com/~/github.com/tarosbubbletea/vite-astro-test

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 26, 2024
@bluwy
Copy link
Member

bluwy commented Nov 26, 2024

Why are you using the package? HMR is already supported for React with the react integration

@matthewp matthewp added needs response Issue needs response from OP and removed needs triage Issue needs to be triaged labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs response Issue needs response from OP
Projects
None yet
Development

No branches or pull requests

3 participants