README.md

February 14, 2022 ยท View on GitHub


Vite Ruby

Build Status Maintainability Test Coverage License

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.