lib/vite_ruby/config.rb in vite_ruby-3.2.8 vs lib/vite_ruby/config.rb in vite_ruby-3.2.9
- old
+ new
@@ -53,15 +53,15 @@
rb_config_path = File.expand_path(config_path.sub(/.json$/, '.rb'), root)
load rb_config_path if File.exist?(rb_config_path)
end
# Public: Sets additional environment variables for vite-plugin-ruby.
- def to_env
+ def to_env(env_vars = ViteRuby.env)
CONFIGURABLE_WITH_ENV.each_with_object({}) do |option, env|
unless (value = @config[option]).nil?
env["#{ ViteRuby::ENV_PREFIX }_#{ option.upcase }"] = value.to_s
end
- end.merge(ViteRuby.env)
+ end.merge(env_vars)
end
# Internal: Files and directories that should be watched for changes.
def watched_paths
[