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

Function transformSugarSS

packages/vite/src/node/plugins/css.ts:1684–1703  ·  view source on GitHub ↗
(
  environment: PartialEnvironment,
  id: string,
  code: string,
)

Source from the content-addressed store, hash-verified

1682}
1683
1684async function transformSugarSS(
1685 environment: PartialEnvironment,
1686 id: string,
1687 code: string,
1688) {
1689 const { config } = environment
1690 const { devSourcemap } = config.css
1691
1692 const sssParser = await loadSss(config.root)
1693 const result = await runPostCSS(
1694 id,
1695 code,
1696 [],
1697 { parser: sssParser },
1698 undefined,
1699 environment.logger,
1700 devSourcemap,
1701 )
1702 return result
1703}
1704
1705async function runPostCSS(
1706 id: string,

Callers 2

compileCSSFunction · 0.85
readFunction · 0.85

Calls 2

loadSssFunction · 0.85
runPostCSSFunction · 0.85

Tested by

no test coverage detected