MCPcopy Create free account
hub / github.com/rolldown/tsdown / resolvePostCSSConfig

Function resolvePostCSSConfig

packages/css/src/postcss.ts:54–65  ·  view source on GitHub ↗
(
  postcssOption: PostCSSOptions | undefined,
  cwd: string,
)

Source from the content-addressed store, hash-verified

52}
53
54function resolvePostCSSConfig(
55 postcssOption: PostCSSOptions | undefined,
56 cwd: string,
57): PostCSSConfigResult | Promise<PostCSSConfigResult | null> {
58 if (typeof postcssOption === 'object') {
59 const { plugins, ...options } = postcssOption
60 return { options, plugins: plugins || [] }
61 }
62
63 const searchPath = typeof postcssOption === 'string' ? postcssOption : cwd
64 return loadFileConfig(searchPath)
65}
66
67export async function processWithPostCSS(
68 code: string,

Callers 1

processWithPostCSSFunction · 0.85

Calls 1

loadFileConfigFunction · 0.85

Tested by

no test coverage detected