daniel-nagy/react-compiler-bug

A repo of an issue with the React Compiler

★ 0Forks 0JavaScriptGitHub ↗Compare

README

React Compiler Bug

This is a repo of a bug with the React Compiler, Vite, and the Vite plugin for React which facilitates Fast Refresh.

GitHub issue react/react#29115

Instructions

  1. Clone this repo
git clone [email protected]:daniel-nagy/react-compiler-bug.git
  1. Install dependencies
npm install
  1. Start the dev server
npm run start
  1. Edit the markdown file and observe that Fast Refresh is broken.

  2. Comment out the React Compiler plugin in the Vite config and observe Fast Refresh works when the markdown changes.

This is likely because the React Compiler cache is global and because it treats imports as constants.

Contributors

daniel-nagy

Issues