lib/vite_ruby/config.rb in vite_ruby-3.2.9 vs lib/vite_ruby/config.rb in vite_ruby-3.2.10

- old
+ new

@@ -73,9 +73,14 @@ config_path.sub(/.json$/, '.{rb,json}'), *DEFAULT_WATCHED_PATHS, ].freeze end + # Internal: Changes the current directory to the root dir. + def within_root(&block) + Dir.chdir(File.expand_path(root), &block) + end + private # Internal: Coerces all the configuration values, in case they were passed # as environment variables which are always strings. def coerce_values(config)