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