Skip to content

⚡️ Vite.js in Rails, bringing joy to your JavaScript experience

License

Notifications You must be signed in to change notification settings

sergii/vite_rails

 
 

Repository files navigation

Vite Rails allows you to use Vite to power the frontend of your Rails app.

Vite is to frontend tooling as Ruby to programming, pure joy! 😍

Check an example app running on Heroku.

Features ⚡️

  • 💡 Instant server start
  • ⚡️ Blazing fast hot reload
  • 🚀 Zero-config deployments
  • 🤝 Integrated with assets:precompile
  • And more!

Documentation 📖

Visit the documentation website to check out the guides and searchable configuration reference.

Installation 💿

Add this line to your application's Gemfile:

gem 'vite_rails'

Then, run:

bundle install
bin/rake vite:install

This will generate configuration files and a sample setup.

Additional installation instructions are available in the documentation website.

Getting Started 💻

Restart your Rails server, and then run bin/vite to start the Vite development server.

Add the following your views/layouts/application.html.erb:

<%= vite_client_tag %>
<%= vite_javascript_tag 'application' %>

Visit any page and you should see a printed console output: Vite ⚡️ Rails.

For more guides and a full configuration reference, check the documentation website.

Contact ✉️

Please use Issues to report bugs you find, and Discussions to make feature requests or get help.

Don't hesitate to ⭐️ star the project if you find it useful!

Special Thanks 🙏

License

The gem is available as open source under the terms of the MIT License.

About

⚡️ Vite.js in Rails, bringing joy to your JavaScript experience

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 83.1%
  • TypeScript 12.2%
  • Vue 2.4%
  • JavaScript 1.0%
  • Logos 0.8%
  • HTML 0.3%
  • CSS 0.2%