Sha256: d33346c2bd50dbb746a25528eb3d340071c4cee3176b33be33ad1c42356b9e7e
Contents?: true
Size: 966 Bytes
Versions: 18
Compression:
Stored size: 966 Bytes
Contents
# frozen_string_literal: true require 'rails/railtie' class ViteRailsLegacy::Engine < Rails::Engine initializer 'vite_rails.proxy' do |app| app.middleware.insert_before 0, 'ViteRuby::DevServerProxy', ssl_verify_none: true if ViteRuby.run_proxy? end initializer 'vite_rails_legacy.helper' do ActiveSupport.on_load(:action_controller) do ActionController::Base.helper(ViteRailsLegacy::TagHelpers) end ActiveSupport.on_load(:action_view) do include ViteRailsLegacy::TagHelpers end end initializer 'vite_rails.logger' do config.after_initialize do ViteRuby.instance.logger = Rails.logger end end initializer 'vite_rails.bootstrap' do if defined?(Rails::Server) || defined?(Rails::Console) ViteRuby.bootstrap if defined?(Spring) require 'spring/watcher' Spring.after_fork { ViteRuby.bootstrap } Spring.watch(ViteRuby.config.config_path) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems