MCPcopy
hub / github.com/tailwindlabs/tailwindcss / getContextFromCache

Function getContextFromCache

packages/@tailwindcss-webpack/src/index.ts:47–59  ·  view source on GitHub ↗
(resourceId: string, opts: LoaderOptions)

Source from the content-addressed store, hash-verified

45}
46
47function getContextFromCache(resourceId: string, opts: LoaderOptions): CacheEntry {
48 let key = getCacheKey(resourceId, opts)
49 if (cache.has(key)) return cache.get(key)!
50 let entry: CacheEntry = {
51 mtimes: new Map<string, number>(),
52 compiler: null,
53 scanner: null,
54 candidates: new Set<string>(),
55 fullRebuildPaths: [],
56 }
57 cache.set(key, entry)
58 return entry
59}
60
61export default async function tailwindLoader(
62 this: LoaderContext<LoaderOptions>,

Callers 1

tailwindLoaderFunction · 0.70

Calls 4

getCacheKeyFunction · 0.85
setMethod · 0.80
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected