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

Function loadSss

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

Source from the content-addressed store, hash-verified

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

Callers 2

compilePostCSSFunction · 0.85
transformSugarSSFunction · 0.85

Calls 1

loadPreprocessorPathFunction · 0.85

Tested by

no test coverage detected