Skip to content

Commit 8b110af

Browse files
committed
Allow react.js and jsxtransformer.js to be overriden by user
1 parent 3cbfddd commit 8b110af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/react/rails/railtie.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ module Rails
55
class Railtie < ::Rails::Railtie
66
config.react = ActiveSupport::OrderedOptions.new
77

8-
initializer "react_rails.setup_vendor", :after => "sprockets.environment" do |app|
8+
# run after all initializers to allow sprockets to pick up react.js and
9+
# jsxtransformer.js from end-user to override ours if needed
10+
config.after_initialize do |app|
911
variant = app.config.react.variant
1012

1113
# Mimic behavior of ember-rails...

0 commit comments

Comments
 (0)