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

Function loadSss

packages/vite/src/node/plugins/css.ts:2476–2485  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

2474
2475let cachedSss: PostCSS.Syntax | Promise<PostCSS.Syntax>
2476async function loadSss(root: string): Promise<PostCSS.Syntax> {
2477 if (!cachedSss) {
2478 cachedSss = (async () => {
2479 const sssPath = loadPreprocessorPath(PostCssDialectLang.sss, root)
2480 const resolved = (await import(pathToFileURL(sssPath).href)).default
2481 return (cachedSss = resolved)
2482 })()
2483 }
2484 return cachedSss
2485}
2486
2487declare const window: unknown
2488declare const location: { href: string } | undefined

Callers 2

compilePostCSSFunction · 0.85
transformSugarSSFunction · 0.85

Calls 1

loadPreprocessorPathFunction · 0.85

Tested by

no test coverage detected