We'll need to manually inject this to support hot reload in react projects:
<script type="module">
import RefreshRuntime from "/@react-refresh"
RefreshRuntime.injectIntoGlobalHook(window)
window.$RefreshReg$ = () => {}
window.$RefreshSig$ = () => (type) => type
window.__vite_plugin_react_preamble_installed__ = true
</script>
Ref: vitejs/vite#1984 (comment)
We'll need to manually inject this to support hot reload in react projects:
Ref: vitejs/vite#1984 (comment)