Describe the bug
Vite HMR breaks when modifying React context provider
Related: vitejs/vite-plugin-react#24
Reproduction
selrond/vite-react-usecontext
System Info
Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:
System:
OS: macOS 10.15.7
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 413.26 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 15.14.0 - ~/.nvm/versions/node/v15.14.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.7.6 - ~/.nvm/versions/node/v15.14.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Browsers:
Brave Browser: 89.1.21.76
Chrome: 90.0.4430.93
Firefox: 87.0
Firefox Developer Edition: 89.0
Safari: 14.0.3
npmPackages:
vite: ^2.2.3 => 2.2.4
Used package manager: npm
Logs
Before submitting the issue, please make sure you do the following
Describe the bug
Vite HMR breaks when modifying React context provider
Related: vitejs/vite-plugin-react#24
Reproduction
selrond/vite-react-usecontext
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:System: OS: macOS 10.15.7 CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz Memory: 413.26 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 15.14.0 - ~/.nvm/versions/node/v15.14.0/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.7.6 - ~/.nvm/versions/node/v15.14.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Browsers: Brave Browser: 89.1.21.76 Chrome: 90.0.4430.93 Firefox: 87.0 Firefox Developer Edition: 89.0 Safari: 14.0.3 npmPackages: vite: ^2.2.3 => 2.2.4Used package manager: npm
Logs
Before submitting the issue, please make sure you do the following