lib/vite_ruby/config.rb in vite_ruby-3.2.11 vs lib/vite_ruby/config.rb in vite_ruby-3.2.12

- old
+ new

@@ -3,10 +3,14 @@ require 'json' # Public: Allows to resolve configuration sourced from `config/vite.json` and # environment variables, combining them with the default options. class ViteRuby::Config + def origin + "#{ protocol }://#{ host_with_port }" + end + def protocol https ? 'https' : 'http' end def host_with_port @@ -88,10 +92,10 @@ config['mode'] = config['mode'].to_s config['port'] = config['port'].to_i config['root'] = Pathname.new(config['root']) config['build_cache_dir'] = config['root'].join(config['build_cache_dir']) config['ssr_output_dir'] = config['root'].join(config['ssr_output_dir']) - coerce_booleans(config, 'auto_build', 'hide_build_console_output', 'https', 'skip_compatibility_check') + coerce_booleans(config, 'auto_build', 'hide_build_console_output', 'https', 'skip_compatibility_check', 'skip_proxy') end # Internal: Coerces configuration options to boolean. def coerce_booleans(config, *names) names.each { |name| config[name] = [true, 'true'].include?(config[name]) }