MCPcopy
hub / github.com/vitejs/vite / importHtml

Function importHtml

playground/environment-react-ssr/src/entry-server.tsx:16–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14declare let __globalServer: ViteDevServer
15
16async function importHtml() {
17 if (import.meta.env.DEV) {
18 const mod = await import('/index.html?raw')
19 return __globalServer.transformIndexHtml('/', mod.default)
20 } else {
21 const mod = await import('/dist/client/index.html?raw')
22 return mod.default
23 }
24}

Callers 1

handlerFunction · 0.85

Calls 1

transformIndexHtmlMethod · 0.80

Tested by

no test coverage detected