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

Function resolveCSSOptions

packages/vite/src/node/plugins/css.ts:214–225  ·  view source on GitHub ↗
(
  options: CSSOptions | undefined,
)

Source from the content-addressed store, hash-verified

212 }
213
214export function resolveCSSOptions(
215 options: CSSOptions | undefined,
216): ResolvedCSSOptions {
217 const resolved = mergeWithDefaults(_cssConfigDefaults, options ?? {})
218 if (resolved.transformer === 'lightningcss') {
219 resolved.lightningcss ??= {}
220 resolved.lightningcss.targets ??= convertTargets(
221 ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET,
222 )
223 }
224 return resolved
225}
226
227const cssModuleRE = new RegExp(`\\.module${CSS_LANGS_RE.source}`)
228const directRequestRE = /[?&]direct\b/

Callers 1

resolveConfigFunction · 0.90

Calls 2

mergeWithDefaultsFunction · 0.90
convertTargetsFunction · 0.85

Tested by

no test coverage detected