The 3 Vite plugins I use on every new Rails project

Author:
Source

Sponsored:

Atlas of AI: Power, Politics, and the Planetary Costs of Artificial Intelligence - Audiobook


Uncover the true cost of artificial intelligence.

Listen now, and see the system behind the screens before the future listens to you. = > Atlas of AI $0.00 with trial. Read by Larissa Gallagher


I’ve completely switched away from Sprockets and Webpacker and am using Vite for my current Rails projects. One thing I’ve discovered is that while the default Vite-Rails installation is nice, it is not very opinionated. I always end up adding these three plugins on top of the standard Vite-Rails config: autoprefixer, rollup-plugin-gzip, and vite-plugin-full-reload. Here’s how to set them up: https://mattbrictson.com/blog/3-vite-rails-plugins

Read more