-
Notifications
You must be signed in to change notification settings - Fork 6
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
vite, hmr, & webpack Script Tag Duplication #77
Comments
Thanks for reporting @mrose! I was able to reproduce the bug and this happens when you don't use any client components before a Suspense boundary, but then you're adding a client component inside the Suspense. A fix is already on the way! |
This fixes an issue about adding scripts to the HTML document in development mode for HMR when the initial page don't use a client component, but a client component is rendered in a `<Suspense>` boundary. #77 Adds a test to verify this use case from now on.
Please check this issue using the latest version of the framework, as it is now available to install. Please let me know if the issue persists in another use case and if so, then please provide a reproduction to have more info on this. |
confirmed fixed so closing |
This issue has been locked since it has been closed for more than 30 days. If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest version of @lazarv/react-server. If you have any other comments you should create a new discussion. |
Describe the bug
Using page-based routing, when I use Suspense the three scripts are duplicated. The duplicated scripts appear after the suspended component is rendered on the browser. Let me know if you need more to repro.
Reproduction
No response
Steps to reproduce
Create an async page which imports a Delay component and React Suspense.
The async Delay component uses setTimeout to delay the output of some text.
Open the dev server and display the page in the browser.
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: