react hmr (fast refresh) breaks when deleting all content of a mdx file
Author: csr632Created Feb 24, 2024Updated Mar 6, 2024
Labels🐛 type/bug🗄 area/interface👶 semver/patch🤞 phase/open
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
3.0.1
Link to runnable example
https://stackblitz.com/edit/vitejs-vite-sorj9w?file=src%2Ftest.mdx,vite.config.ts&terminal=dev
Steps to reproduce
- Go to https://stackblitz.com/edit/vitejs-vite-sorj9w?file=src%2Ftest.mdx,vite.config.ts&terminal=dev (run
npm run devif it is not auto run) - Delete all content of
test.mdx - The app is broken after hmr:
Expected behavior
The app should not be broken.
Actual behavior
The app is broken.
Runtime
Node v20
Package manager
npm v10
OS
macOS
Build and bundle tools
Vite
Source: mdx-js/mdx