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 1
1
PATH
2
2
remote: .
3
3
specs:
4
- react_on_rails (14.1 .1 )
4
+ react_on_rails (14.2 .1 )
5
5
addressable
6
6
connection_pool
7
7
execjs (~> 2.5 )
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def create_pack(file_path)
47
47
def pack_file_contents ( file_path )
48
48
registered_component_name = component_name ( file_path )
49
49
<<~FILE_CONTENT
50
- import ReactOnRails from 'react-on-rails';
50
+ import ReactOnRails from 'react-on-rails/client ';
51
51
import #{ registered_component_name } from '#{ relative_component_path_from_generated_pack ( file_path ) } ';
52
52
53
53
ReactOnRails.register({#{ registered_component_name } });
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ module ReactOnRails
195
195
it "generated pack for ComponentWithClientOnly uses client file for pack" do
196
196
pack_content = File . read ( component_pack )
197
197
198
+ expect ( pack_content ) . to include ( "react-on-rails/client" )
198
199
expect ( pack_content ) . to include ( "#{ component_name } .client.jsx" )
199
200
expect ( pack_content ) . not_to include ( "#{ component_name } .jsx" )
200
201
expect ( pack_content ) . not_to include ( "#{ component_name } .server.jsx" )
@@ -203,6 +204,7 @@ module ReactOnRails
203
204
it "generated server bundle do not have ComponentWithClientOnly registered" do
204
205
generated_server_bundle_content = File . read ( generated_server_bundle_file_path )
205
206
207
+ expect ( generated_server_bundle_content ) . not_to include ( "react-on-rails/client" )
206
208
expect ( generated_server_bundle_content ) . not_to include ( "#{ component_name } .jsx" )
207
209
expect ( generated_server_bundle_content ) . not_to include ( "#{ component_name } .client.jsx" )
208
210
expect ( generated_server_bundle_content ) . not_to include ( "#{ component_name } .server.jsx" )
You can’t perform that action at this time.
0 commit comments