Right now, the only way is to do this:
config.component_dirs.add "some_dir" do
dir.auto_register = proc do |component|
relative_path = component.file_path.relative_path_from(root).to_s
!relative_path.start_with?("config#{File::PATH_SEPARATOR}")
end
end
Which feels a bit too roundabout, and also imposes a cost on every auto-registration.
We may be able to take inspiration on how Zeitwerk does this.