rails / cssbundling-rails

Bundle and process CSS in Rails with Tailwind, PostCSS, and Sass via Node.js.
MIT License
579 stars 83 forks source link

Dependency issues with postcss-preset-env #29

Closed ryanb closed 3 years ago

ryanb commented 3 years ago

The postcss-preset-env package hasn't released a new version in 2 years and is starting to cause dependency issues. For example, this warning shows up when using the latest version of tailwindcss since the autoprefixer versions conflict.

tailwindcss@2.2.15" has unmet peer dependency "autoprefixer@^10.0.2"

I recommend removing postcss-present-env from the default install and including the plugins directly. For example, add autoprefixer and postcss-nesting packages if that's what is used by the app.

This results in fewer npm dependencies and a faster postcss build because it is only doing what the app needs.

dhh commented 3 years ago

Happy to take a patch that just does autoprefixer and css nesting as a smaller default area 👍