File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 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
3636 directory = app . config . react . variant == :production ? 'production' : 'development'
3737 directory += '-with-addons' if app . config . react . addons
3838
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
4141 end
4242
4343 config . after_initialize do |app |
Original file line number Diff line number Diff line change @@ -16,4 +16,10 @@ class ReactTest < ActionDispatch::IntegrationTest
1616 assert_response :success
1717 assert_equal react_file_token , @response . body
1818 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
1925end
You can’t perform that action at this time.
0 commit comments