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

Function renderChunk

packages/vite/src/node/plugins/asset.ts:248–261  ·  view source on GitHub ↗
(code, chunk, opts)

Source from the content-addressed store, hash-verified

246 ...(config.command === 'build'
247 ? {
248 renderChunk(code, chunk, opts) {
249 const s = renderAssetUrlInJS(this, chunk, opts, code)
250
251 if (s) {
252 return {
253 code: s.toString(),
254 map: this.environment.config.build.sourcemap
255 ? s.generateMap({ hires: 'boundary' })
256 : null,
257 }
258 } else {
259 return null
260 }
261 },
262 }
263 : {}),
264

Callers

nothing calls this directly

Calls 1

renderAssetUrlInJSFunction · 0.85

Tested by

no test coverage detected