Sha256: 57d837793dabc9296ee31a400b3cfba3f09b44d24c77f51524a24a7be40212bf
Contents?: true
Size: 1.1 KB
Versions: 13
Compression:
Stored size: 1.1 KB
Contents
# frozen_string_literal: true require 'rails/railtie' class ViteRails::Engine < Rails::Engine initializer 'vite_rails.proxy' do |app| app.middleware.insert_before 0, ViteRails::DevServerProxy, ssl_verify_none: true if ViteRails.run_proxy? end initializer 'vite_rails.helper' do ActiveSupport.on_load(:action_controller) do ActionController::Base.helper(ViteRails::Helper) end ActiveSupport.on_load(:action_view) do include ViteRails::Helper end end initializer 'vite_rails.logger' do config.after_initialize do ViteRails.logger = if ::Rails.logger.respond_to?(:tagged) ::Rails.logger else ActiveSupport::TaggedLogging.new(::Rails.logger) end end end initializer 'vite_rails.bootstrap' do if defined?(Rails::Server) || defined?(Rails::Console) ViteRails.bootstrap if defined?(Spring) require 'spring/watcher' Spring.after_fork { ViteRails.bootstrap } Spring.watch(ViteRails.config.config_path) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems