The 3 Vite plugins I use on every new Rails project

Sponsored:

Your customers are already searching—if you’re not online, they’re choosing someone else. A polished website builds trust, works 24/7, and turns interest into action. With RoseHosting, you don’t need code, a big budget, or weeks of waiting: pick a design, add your content, and launch fast.

Stop being invisible. Start owning your digital storefront today—build your WordPress site now.

Author:
Source

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