From 1175779a94109e1decee6833c1129d2e520e2cdd Mon Sep 17 00:00:00 2001 From: Alexey Romanov Date: Wed, 20 Jul 2022 22:10:27 +0300 Subject: [PATCH] Fix common_component_to_path --- lib/react_on_rails/packs_generator.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/react_on_rails/packs_generator.rb b/lib/react_on_rails/packs_generator.rb index 9433319dd6..04e6d8c372 100644 --- a/lib/react_on_rails/packs_generator.rb +++ b/lib/react_on_rails/packs_generator.rb @@ -136,7 +136,9 @@ def self.component_name_to_path(paths) end def self.common_component_to_path - common_components_paths = Dir.glob("#{components_search_path}/*[!(.server.|.client.)]*") + common_components_paths = Dir.glob("#{components_search_path}/*").reject do + |f| f.include?(".client.") || f.include?(".server.") + end component_name_to_path(common_components_paths) end