-
-
Notifications
You must be signed in to change notification settings - Fork 231
Closed
Closed
Copy link
Labels
Description
Related plugins
Describe the bug
When upgrading from @vitejs/plugin-react version 5.0.2 to 5.0.3, I started getting an error in my build:
ReferenceError: window is not defined @react-refresh:599:1
@react-refresh:599
I'm stuck on the old version for now. Is it possible to please check if this is a regression bug, or something I need to fix/workaround in my project, and if so, any tips?
Thank you!
Reproduction
https://github.com/mtmacdonald/docgen
Steps to reproduce
To reproduce
- check out
masterbranch in github.com/mtmacdonald/docgen - upgrade
@vitejs/plugin-reactto5.0.3or later inpackage.json yarn installyarn dev:docs- load URL http://localhost:5173/pdf
- see the error in the browser console
System Info
System:
OS: macOS 26.2
CPU: (12) arm64 Apple M2 Pro
Memory: 152.05 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.19.0 - /Users/mark/.nvm/versions/node/v22.19.0/bin/node
Yarn: 1.22.22 - /Users/mark/.nvm/versions/node/v22.19.0/bin/yarn
npm: 10.9.3 - /Users/mark/.nvm/versions/node/v22.19.0/bin/npm
Browsers:
Chrome: 143.0.7499.193
Firefox: 136.0.4
Firefox Developer Edition: 147.0
Safari: 26.2
npmPackages:
@vitejs/plugin-react: 5.0.3 => 5.0.3
rolldown-vite: ^7.3.1 => 7.1.0Used Package Manager
yarn
Logs
ReferenceError: window is not defined @react-refresh:599:1
@react-refresh:599
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable