Skip to content

Instantly share code, notes, and snippets.

@yusukebe
Created March 28, 2025 01:51
Show Gist options
  • Save yusukebe/f8124c5e4acedd8c297066e1ff7a2335 to your computer and use it in GitHub Desktop.
Save yusukebe/f8124c5e4acedd8c297066e1ff7a2335 to your computer and use it in GitHub Desktop.
app.use(
'/',
reactRenderer(({ children }) => {
return (
<html lang="en">
<head>
<meta charSet="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React TS</title>
<script type="module" src="/@react-refresh"></script>
<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>
</head>
<body>{children}</body>
</html>
)
})
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment