Skip to content

Commit

Permalink
feat: accept AcceptedPlugin type for postcss plugin (#8830)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jun 28, 2022
1 parent 0b00f49 commit 6886078
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/config/shared-options.md
Expand Up @@ -198,7 +198,7 @@ Configure CSS modules behavior. The options are passed on to [postcss-modules](h

## css.postcss

- **Type:** `string | (postcss.ProcessOptions & { plugins?: postcss.Plugin[] })`
- **Type:** `string | (postcss.ProcessOptions & { plugins?: postcss.AcceptedPlugin[] })`

Inline PostCSS config or a custom directory to search PostCSS config from (default is project root).

Expand Down
6 changes: 3 additions & 3 deletions packages/vite/src/node/plugins/css.ts
Expand Up @@ -70,7 +70,7 @@ export interface CSSOptions {
postcss?:
| string
| (PostCSS.ProcessOptions & {
plugins?: PostCSS.Plugin[]
plugins?: PostCSS.AcceptedPlugin[]
})
/**
* Enables css sourcemaps during dev
Expand Down Expand Up @@ -833,7 +833,7 @@ async function compileCSS(
UrlRewritePostcssPlugin({
replacer: urlReplacer,
logger: config.logger
}) as PostCSS.Plugin
})
)

if (isModule) {
Expand Down Expand Up @@ -1009,7 +1009,7 @@ async function finalizeCss(

interface PostCSSConfigResult {
options: PostCSS.ProcessOptions
plugins: PostCSS.Plugin[]
plugins: PostCSS.AcceptedPlugin[]
}

async function resolvePostcssConfig(
Expand Down

0 comments on commit 6886078

Please sign in to comment.