If you are interested to learn more about Vite Ruby before trying it, check out the Introduction.
If you are looking for configuration options, check out the configuration reference.
Add this line to your application's Gemfile:
And then run:
If using Jekyll, install the jekyll-vite gem instead.
If using Hanami, install the vite_hanami gem instead.
If using Padrino, install the vite_padrino gem instead.
If using other Ruby web frameworks, install the vite_ruby gem.
If using Rails 4, install the vite_rails_legacy gem.
Run bundle exec vite install, which:
Adds the bin/vite executable to start the dev server and run other commands
Creates a sample
application.jsentrypoint in your web app
Injects tag helpers in the default
If you are using a different layout file, follow the Tag Helpers section to add them manually.
Running your first example 🏃♂️
Run bin/vite dev to start the Vite development server.
Restart your Rails or Rack web server before visiting any page, and you should see a printed console output:
Vite ⚡️ Ruby
Not seeing anything?
Check the Troubleshooting section for common problems.
Further Configuration 🧩
Don't hesitate to ⭐️ star the project if you find it useful!
Using it in production? Always love to hear about it! 😃