( config?: ResolvedConfig, )
| 524 | const tsconfigResolutionCacheMap = new WeakMap<ResolvedConfig, TsconfigCache>() |
| 525 | |
| 526 | export function getTSConfigResolutionCache( |
| 527 | config?: ResolvedConfig, |
| 528 | ): TsconfigCache { |
| 529 | if (!config) { |
| 530 | return (globalTSConfigResolutionCache ??= new TsconfigCache()) |
| 531 | } |
| 532 | let cache = tsconfigResolutionCacheMap.get(config) |
| 533 | if (!cache) { |
| 534 | cache = new TsconfigCache() |
| 535 | tsconfigResolutionCacheMap.set(config, cache) |
| 536 | } |
| 537 | return cache |
| 538 | } |
| 539 | |
| 540 | export function reloadOnTsconfigChange( |
| 541 | server: ViteDevServer, |
no test coverage detected