postcss / autoprefixer

Parse CSS and add vendor prefixes to rules by Can I Use
https://twitter.com/autoprefixer
MIT License
21.58k stars 1.25k forks source link

Type errors in autoprefixer.d.ts #1460

Closed ollar closed 2 years ago

ollar commented 2 years ago

Hello. I am trying to add autoprefixer to our stencil project and added a clean configuration

plugins: [
    postcss({
      plugins: [autoprefixer()]
    })
  ]

but typescript gives me the error below

[stencil] [ ERROR ]  TypeScript: ./node_modules/autoprefixer/lib/autoprefixer.d.ts:6:4
[stencil]            Generic type 'Plugin<T>' requires 1 type argument(s).
[stencil] 
[stencil]       L5:    ...args: [...T, autoprefixer.Options]
[stencil]       L6:  ): Plugin & autoprefixer.ExportedAPI
[stencil] 
[stencil] [58:30.7]  build failed, watching for changes... in 1.95

any suggestions how to fix this? Thanks.

ai commented 2 years ago

Try to update PostCSS to the latest version. Maybe you have old version with old types?

ollar commented 2 years ago

Thanks, that helped! I think I need to write an issue to @stencil/postcss repo