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

Function render

playground/ssr/src/app.js:13–20  ·  view source on GitHub ↗
(url, rootDir)

Source from the content-addressed store, hash-verified

11}
12
13export async function render(url, rootDir) {
14 const pathname = url.replace(/#[^#]*$/, '').replace(/\?[^?]*$/, '')
15 const renderer = pathRenderers[pathname]
16 if (renderer) {
17 return await renderer(rootDir)
18 }
19 return '404'
20}
21
22async function renderRoot(rootDir) {
23 const paths = Object.keys(pathRenderers).filter((key) => key !== '/')

Callers 7

main.tsxFile · 0.50
main.jsxFile · 0.50
index.tsxFile · 0.50
main.tsxFile · 0.50
index.jsxFile · 0.50
main.jsxFile · 0.50
createServerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected