You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We use Rails custom environments e.g. staging, unit_test, ...
Since run_proxy? has hardcoded env names and logic, it would be great to make run_proxy? configurable as lambda that returns true/false in config/vite.rb.
# Public: The proxy for assets should not run in production mode or test mode when env CI is present.
def run_proxy?
return false if config.mode == "production"
return false if config.mode.ends_with?("test") && ENV.fetch("CI", false)
true
rescue StandardError => e
logger.error("Failed to check mode for Vite: #{e.message}")
false
end
The text was updated successfully, but these errors were encountered:
vizo
changed the title
ViteRuby: Add configuration for running proxy in custom environments in config/vite.rb
ViteRuby: Add configuration in config/vite.rb for running proxy in custom environments
Jan 7, 2025
Is your feature request related to a problem? Please describe.
We use Rails custom environments e.g. staging, unit_test, ...
Since run_proxy? has hardcoded env names and logic, it would be great to make run_proxy? configurable as lambda that returns true/false in config/vite.rb.
Additional context
Source code:
vite_ruby/vite_ruby/lib/vite_ruby.rb
Line 109 in dcdfbba
For now i had to monkey patch:
The text was updated successfully, but these errors were encountered: