File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- react_on_rails (14.1 .1 )
4+ react_on_rails (14.2 .1 )
55 addressable
66 connection_pool
77 execjs (~> 2.5 )
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def create_pack(file_path)
4747 def pack_file_contents ( file_path )
4848 registered_component_name = component_name ( file_path )
4949 <<~FILE_CONTENT
50- import ReactOnRails from 'react-on-rails';
50+ import ReactOnRails from 'react-on-rails/client ';
5151 import #{ registered_component_name } from '#{ relative_component_path_from_generated_pack ( file_path ) } ';
5252
5353 ReactOnRails.register({#{ registered_component_name } });
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ module ReactOnRails
195195 it "generated pack for ComponentWithClientOnly uses client file for pack" do
196196 pack_content = File . read ( component_pack )
197197
198+ expect ( pack_content ) . to include ( "react-on-rails/client" )
198199 expect ( pack_content ) . to include ( "#{ component_name } .client.jsx" )
199200 expect ( pack_content ) . not_to include ( "#{ component_name } .jsx" )
200201 expect ( pack_content ) . not_to include ( "#{ component_name } .server.jsx" )
@@ -203,6 +204,7 @@ module ReactOnRails
203204 it "generated server bundle do not have ComponentWithClientOnly registered" do
204205 generated_server_bundle_content = File . read ( generated_server_bundle_file_path )
205206
207+ expect ( generated_server_bundle_content ) . not_to include ( "react-on-rails/client" )
206208 expect ( generated_server_bundle_content ) . not_to include ( "#{ component_name } .jsx" )
207209 expect ( generated_server_bundle_content ) . not_to include ( "#{ component_name } .client.jsx" )
208210 expect ( generated_server_bundle_content ) . not_to include ( "#{ component_name } .server.jsx" )
You can’t perform that action at this time.
0 commit comments