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

Function getTSConfigResolutionCache

packages/vite/src/node/plugins/esbuild.ts:526–538  ·  view source on GitHub ↗
(
  config?: ResolvedConfig,
)

Source from the content-addressed store, hash-verified

524const tsconfigResolutionCacheMap = new WeakMap<ResolvedConfig, TsconfigCache>()
525
526export 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
540export function reloadOnTsconfigChange(
541 server: ViteDevServer,

Callers 3

transformWithOxcFunction · 0.90
transformWithEsbuildFunction · 0.85
reloadOnTsconfigChangeFunction · 0.85

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected