Related to https://github.com/tailwindcss/tailwindcss/issues/291
Maybe it would be better to _not_ automatically include Autoprefixer as a dependency of Tailwind?
Personally, I'm using postcss-next which already includes Autoprefixer, so although I am not including Autoprefixer in my project postcss-next is throwing me warnings:
[13:06:26] Starting 'styles'...
Warning: postcss-cssnext found a duplicate plugin ('autoprefixer') in your postcss plugins. This might be inefficient. You should remove 'autoprefixer' from your postcss plugin list since it's already included by postcss-cssnext.
Note: If, for a really specific reason, postcss-cssnext warnings are irrelevant for your use case, and you really know what you are doing, you can disable this warnings by setting 'warnForDuplicates' option of postcss-cssnext to 'false'.
[13:06:28] Finished 'styles' after 2.87 s
Maybe somebody would prefer not to have their styles vendor prefixed? Might happen somewhere! :)
Tailwind doesn't use autoprefixer except for our dist builds and doesn't run it against your code at all when used as a PostCSS plugin.
What is your build setup, are you using Laravel Mix by any chance? Laravel Mix automatically adds autoprefixer, so if using cssnext and you want to avoid the duplicate plugin warning, disable autoprefixer in cssnext:
// ...
cssnext({
features: {
autoprefixer: false
}
})
// ...
Going to close this since I promise Tailwind doesn't run autoprefixer on your code, but happy to help troubleshoot why you're getting that duplicate plugin warning.
My humble apologies @adamwathan I jumped to a hasty conclusion without exploring the other possible options first. Thank you for being so gracious!
The culprit turned out to be cssnano. Sorry.
Loving everything I'm seeing in Tailwind btw, keep up the great work 馃
Most helpful comment
Tailwind doesn't use autoprefixer except for our dist builds and doesn't run it against your code at all when used as a PostCSS plugin.
What is your build setup, are you using Laravel Mix by any chance? Laravel Mix automatically adds autoprefixer, so if using cssnext and you want to avoid the duplicate plugin warning, disable autoprefixer in cssnext: