Home

Awesome

<h1 align="center"> <a href="https://vite-ruby.netlify.app/"> <img src="https://raw.githubusercontent.com/ElMassimo/vite_ruby/main/logo.svg" width="200px"/> </a> <br> <a href="https://vite-ruby.netlify.app/"> Vite Ruby </a> <br> <p align="center"> <a href="https://github.com/ElMassimo/vite_ruby/actions"> <img alt="Build Status" src="https://github.com/ElMassimo/vite_ruby/workflows/build/badge.svg"/> </a> <a href="https://codeclimate.com/github/ElMassimo/vite_ruby"> <img alt="Maintainability" src="https://codeclimate.com/github/ElMassimo/vite_ruby/badges/gpa.svg"/> </a> <a href="https://codeclimate.com/github/ElMassimo/vite_ruby"> <img alt="Test Coverage" src="https://codeclimate.com/github/ElMassimo/vite_ruby/badges/coverage.svg"/> </a> <a href="https://github.com/ElMassimo/vite_ruby/blob/master/LICENSE.txt"> <img alt="License" src="https://img.shields.io/badge/license-MIT-428F7E.svg"/> </a> </p> </h1>

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 ⚡️

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 <kbd>bin/vite dev</kbd> 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.