You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The suggestion here would be to replace PostCSS.Plugin[] with PostCSS.AcceptedPlugin[] as the return type for the plugins property under vite postcss config:
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
Under vite css config we can add postcss plugins, however vite's type definitions state that plugins is an array of
PostCSS.Plugin[]
vite/packages/vite/src/node/plugins/css.ts
Lines 70 to 74 in 895a7d6
The problem with this is that some plugins can return a
PostCSS.PluginCreator
instead, such as tailwindcssThis disparity, makes it difficult to have valid typings when importing a tailwind config which outputs as
PluginCreator
on vitePostCSS has their own type for allowing multiple plugin type formats as
PostCSS.AcceptedPlugin
The suggestion here would be to replace
PostCSS.Plugin[]
withPostCSS.AcceptedPlugin[]
as the return type for theplugins
property under vite postcss config:Reproduction
N/A Type definition only
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: