File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 7
7
// CRITICAL that webpack/vendor-bundle must be BEFORE turbolinks
8
8
// since it is exposing jQuery and jQuery-ujs
9
9
10
- < % if ENV [ "REACT_ON_RAILS_ENV" ] != "HOT" % >
11
- < % require_asset "vendor-bundle" % >
12
- < % require_asset "app-bundle" % >
13
- < % end % >
10
+ //= require vendor-bundle
11
+ //= require app-bundle
14
12
15
13
// Non-webpack assets incl turbolinks
16
14
//= require application_non_webpack
Original file line number Diff line number Diff line change 8
8
9
9
# Precompile additional assets.
10
10
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
- Rails . application . config . assets . precompile += %w(
12
- application_*.*
13
- server-bundle.js
14
- )
11
+ Rails . application . config . assets . precompile << "server-bundle.js"
12
+
13
+ type = ENV [ "REACT_ON_RAILS_ENV" ] == "HOT" ? "non_webpack" : "static"
14
+ Rails . application . config . assets . precompile +=
15
+ [
16
+ "application_#{ type } .js" ,
17
+ "application_#{ type } .css"
18
+ ]
You can’t perform that action at this time.
0 commit comments