ai / autoprefixer-rails

Autoprefixer for Ruby and Ruby on Rails
https://twitter.com/autoprefixer
MIT License
1.22k stars 109 forks source link

Compatibility with Rails 8 and Propshaft #229

Open westonganger opened 1 week ago

westonganger commented 1 week ago

Now that Rails 8 is out and they've dropped Sprockets for new installations. How can this gem support Propshaft based installations?

I feel like the transformation this gem applies will probably the feature I would miss the most. So im raising this question here in hopes of some mechanism to support Propshaft.

albb0920 commented 1 week ago

Hi @westonganger, thank you for brining this up. IIUC, Propshaft is not designed to be extended, but rather use in conjunction with external build tools.

From their README

Propshaft does a lot less than Sprockets, by design, so it might well be a fair bit of work to migrate if it's even desirable. This is particularly true if you rely on Sprockets to provide any form of transpiling, like CoffeeScript or Sass, or if you rely on any gems that do. You'll need to either stop transpiling or use a Node-based transpiler, like those in jsbundling-rails and cssbundling-rails.

I believe you can use cssbundling-rails to setup postcss, and use autoprefixer with it.

As Sprockets is still available as an alternative option, this gem is likely only going to support Sprockets use cases.