Module: Bundlebun::Integrations::ViteRuby
- Defined in:
- lib/bundlebun/integrations/vite_ruby.rb
Overview
An integration for [vite-ruby](github.com/ElMassimo/vite_ruby) and [vite-rails](vite-ruby.netlify.app).
For that, we would need both to replace the vite binstub (as ‘bin/vite` exists by itself and does not really initialize this gem if it is installed), and redefine the RunnerExtensions for ViteRuby by calling this patch from a Rails initializer. This way, a typical `bin/dev` would work, as well as integration tests.
Defined Under Namespace
Modules: RunnerExtensions
Class Method Summary collapse
-
.bun! ⇒ Object
Patches the existing module.
Class Method Details
.bun! ⇒ Object
Patches the existing module.
Call this after everything is loaded and required. For a Rails application, a good place is an initializer.
See the documentation for more info on installation Rake tasks.
25 26 27 28 29 |
# File 'lib/bundlebun/integrations/vite_ruby.rb', line 25 def self.bun! return unless defined?(::ViteRuby::Runner) ::ViteRuby::Runner.prepend(self::RunnerExtensions) end |