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

Function renderBuiltUrl

playground/assets/vite.config-runtime-base.js:44–58  ·  view source on GitHub ↗
(filename, { hostType, type })

Source from the content-addressed store, hash-verified

42 ],
43 experimental: {
44 renderBuiltUrl(filename, { hostType, type }) {
45 if (type === 'asset') {
46 if (hostType === 'js') {
47 return {
48 runtime: `globalThis.__toAssetUrl(${JSON.stringify(filename)})`,
49 }
50 }
51 } else if (type === 'public') {
52 if (hostType === 'js') {
53 return {
54 runtime: `globalThis.__publicBase+${JSON.stringify(filename)}`,
55 }
56 }
57 }
58 },
59 },
60 cacheDir: 'node_modules/.vite-runtime-base',
61})

Callers 3

toOutputFilePathInHtmlFunction · 0.50
toOutputFilePathInJSFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected