Function
transformStableResult
(
s: MagicString,
id: string,
config: ResolvedConfig,
)
Source from the content-addressed store, hash-verified
| 1577 | * so we can skip sourcemap generation during dev |
| 1578 | */ |
| 1579 | export 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 | |
| 1593 | type AsyncFlatten<T extends unknown[]> = T extends (infer U)[] |
| 1594 | ? Exclude<Awaited<U>, U[]>[] |
Tested by
no test coverage detected