File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ class Railtie < ::Rails::Railtie
36
36
directory = app . config . react . variant == :production ? 'production' : 'development'
37
37
directory += '-with-addons' if app . config . react . addons
38
38
39
- app . assets . append_path ( root_path . join ( 'lib/assets/react-source/' ) . join ( directory ) . to_s )
40
- app . assets . append_path ( root_path . join ( 'lib/assets/javascripts/' ) . to_s )
39
+ app . config . assets . paths << root_path . join ( 'lib/assets/react-source/' ) . join ( directory ) . to_s
40
+ app . config . assets . paths << root_path . join ( 'lib/assets/javascripts/' ) . to_s
41
41
end
42
42
43
43
config . after_initialize do |app |
Original file line number Diff line number Diff line change @@ -16,4 +16,10 @@ class ReactTest < ActionDispatch::IntegrationTest
16
16
assert_response :success
17
17
assert_equal react_file_token , @response . body
18
18
end
19
+
20
+ test 'precompiling assets works' do
21
+ Dummy ::Application . load_tasks
22
+ Rake ::Task [ 'assets:precompile' ] . invoke
23
+ FileUtils . rm_r ( File . expand_path ( "../dummy/public/assets" , __FILE__ ) )
24
+ end
19
25
end
You can’t perform that action at this time.
0 commit comments