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

Function transformStableResult

packages/vite/src/node/utils.ts:1579–1591  ·  view source on GitHub ↗
(
  s: MagicString,
  id: string,
  config: ResolvedConfig,
)

Source from the content-addressed store, hash-verified

1577 * so we can skip sourcemap generation during dev
1578 */
1579export function transformStableResult(
1580 s: MagicString,
1581 id: string,
1582 config: ResolvedConfig,
1583): TransformResult {
1584 return {
1585 code: s.toString(),
1586 map:
1587 config.command === 'build' && config.build.sourcemap
1588 ? s.generateMap({ hires: 'boundary', source: id })
1589 : null,
1590 }
1591}
1592
1593type AsyncFlatten<T extends unknown[]> = T extends (infer U)[]
1594 ? Exclude<Awaited<U>, U[]>[]

Callers 5

handlerFunction · 0.90
transformFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected