Rails 7: Vite Rails

The Vite Rails setup is extremely easy, and it provides a

rails new ViteRails

rails new MyViteRailsApp --skip-javascript

bundle add vite_rails

Then run bundle install

bundle exec vite install

When using vite, you will start your development server with bin/vite dev

Let’s take a look at a few important files

package.json

config/vite.json

Procfile.dev