( postcssOption: PostCSSOptions | undefined, cwd: string, )
| 52 | } |
| 53 | |
| 54 | function 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 | |
| 67 | export async function processWithPostCSS( |
| 68 | code: string, |
no test coverage detected