Rails 6.1, TailwindCSS JIT, Webpacker & PostCSS 8
Chances are you come from one of my previous Medium posts on getting TailwindCSS up and running in Rails. As is the nature of the beast in development, much has changed since my first post in April 2019, where we set up Rails 6 with TailwindCSS version 1 beta. We are currently on Rails 6.1.3.2, and TailwindCSS has matured to version 2.1.4 as I write this. Add to this the current state of Webpacker version 6. I’m not going to go deep here, but it seems Postcss 8 requires Webpack 6. And we’ll enable Tailswind’s new JIT mode for super fast pre compilation.
Thanks to some help from the folks in the #rails channel over on the StimulusReflex Discord Server, more specifically @theleastbad.
See here: Rails 6.1, Tailwind 2.1.4 (JIT), Webpacker 6 & PostCSS 8
Feel free to follow me on Twitter.