Vite ⚡️ Rails
[website]: https://vite-rails.netlify.app/
[features]: https://vite-rails.netlify.app/guide/introduction.html
[guides]: https://vite-rails.netlify.app/guide/
[config]: https://vite-rails.netlify.app/config/
[vite_rails]: https://github.com/ElMassimo/vite_rails
[webpacker]: https://github.com/rails/webpacker
[vite]: http://vitejs.dev/
[config file]: https://github.com/ElMassimo/vite_rails/blob/main/package/default.vite.json
[__Vite Rails__][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! 😍
## Features ⚡️
- 🤖 Automatic entrypoint detection
- ⚡️ Blazing fast hot reload
- 🚀 Zero-config deployments
- 🤝 Integrated with assets:precompile
- [And more!][features]
## Documentation 📖
Visit the [documentation website][website] to check out the [guides] and searchable [configuration reference].
## Installation 💿
Add this line to your application's Gemfile:
```ruby
gem 'vite_rails'
```
Then, run:
```bash
bundle install
bin/rake vite:install
```
This will generate configuration files and a sample setup.
Additional installation instructions are available in the [documentation website][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`:
```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][website].
## Inspiration 💡
- [webpacker]
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).