Sha256: cdfe5f4363d47a7e9312cd903819524cc00ec0bed67eb2953f5a81f073f914e4

Contents?: true

Size: 430 Bytes

Versions: 6

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

module ViteRailsLegacy::Config
  # Override: Default values for a Rails application.
  def config_defaults
    require 'rails'
    super(
      asset_host: Rails.application&.config&.action_controller&.asset_host,
      mode: Rails.env.to_s,
      root: Rails.root || Dir.pwd,
    )
  end
end

require 'active_support/core_ext/hash'
ViteRuby::Config.singleton_class.prepend(ViteRailsLegacy::Config)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vite_rails_legacy-3.0.3 lib/vite_rails_legacy/config.rb
vite_rails_legacy-3.0.2 lib/vite_rails_legacy/config.rb
vite_rails_legacy-3.0.1 lib/vite_rails_legacy/config.rb
vite_rails_legacy-3.0.0 lib/vite_rails_legacy/config.rb
vite_rails_legacy-3.0.0.beta.1 lib/vite_rails_legacy/config.rb
vite_rails_legacy-2.0.12 lib/vite_rails_legacy/config.rb