File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -16,21 +16,19 @@ class Railtie < ::Rails::Railtie
16
16
config . react . component_filenames = [ 'components.js' ]
17
17
18
18
# Watch .jsx files for changes in dev, so we can reload the JS VMs with the new JS code.
19
- initializer "react_rails.add_watchable_files" do |app |
19
+ initializer "react_rails.add_watchable_files" , group : :all do |app |
20
20
app . config . watchable_files . concat Dir [ "#{ app . root } /app/assets/javascripts/**/*.jsx*" ]
21
21
end
22
22
23
23
# Include the react-rails view helper lazily
24
- initializer "react_rails.setup_view_helpers" do |app |
24
+ initializer "react_rails.setup_view_helpers" , group : :all do |app |
25
25
React ::JSX . transform_options = app . config . react . jsx_transform_options
26
26
ActiveSupport . on_load ( :action_view ) do
27
27
include ::React ::Rails ::ViewHelper
28
28
end
29
29
end
30
30
31
- # run after all initializers to allow sprockets to pick up react.js and
32
- # jsxtransformer.js from end-user to override ours if needed
33
- initializer "react_rails.setup_vendor" , :after => "sprockets.environment" , group : :all do |app |
31
+ initializer "react_rails.setup_vendor" , group : :all do |app |
34
32
# Mimic behavior of ember-rails...
35
33
# We want to include different files in dev/prod. The unminified builds
36
34
# contain console logging for invariants and logging to help catch
You can’t perform that action at this time.
0 commit comments