Skip to content

usemast/vite_ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c8bb06b · Dec 22, 2023
Jun 27, 2023
Feb 25, 2021
Aug 16, 2021
Oct 5, 2023
Jun 19, 2023
Feb 8, 2023
Oct 19, 2022
Oct 5, 2023
Apr 28, 2023
Apr 28, 2023
Feb 14, 2022
Feb 14, 2022
Feb 14, 2022
Oct 5, 2023
Apr 29, 2022
Dec 22, 2023
Feb 25, 2021
Dec 2, 2022
Apr 8, 2022
Jul 22, 2021
Jul 13, 2022
Aug 16, 2021
Mar 17, 2022
Feb 25, 2021
Feb 25, 2021
Aug 16, 2021
Oct 5, 2023
Jan 19, 2021
Feb 14, 2022
Feb 10, 2021
Feb 10, 2021
Feb 7, 2022
Jul 13, 2022
Jun 27, 2023
Oct 19, 2022
Jan 19, 2021

Repository files navigation

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

This repo contains libraries that will allow you to easily integrate Vite in your favourite Ruby framework, such as Rails or Hanami.

Why Vite? 🤔

Vite does not bundle your code during development, which means the dev server is extremely fast to start, and your changes will be updated instantly.

In production, Vite bundles your code with tree-shaking, lazy-loading, and common chunk splitting out of the box, to achieve optimal loading performance.

It also provides great defaults, and is easier to configure than similar tools like webpack.

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' # vite_hanami for Hanami apps, vite_ruby for Rack apps

Then, run:

bundle install
bundle exec vite install

This will generate configuration files and a sample setup.

Additional installation instructions are available in the documentation website.

Getting Started 💻

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

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

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!

Using it in production? Always love to hear about it! 😃

Special Thanks 🙏

License

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