lib/react/rails/railtie.rb in react-rails-1.7.1 vs lib/react/rails/railtie.rb in react-rails-1.7.2
- old
+ new
@@ -23,11 +23,11 @@
initializer "react_rails.add_watchable_files", group: :all do |app|
app.config.watchable_files.concat Dir["#{app.root}/app/assets/javascripts/**/*.jsx*"]
end
# Include the react-rails view helper lazily
- initializer "react_rails.setup_view_helpers", group: :all do |app|
+ initializer "react_rails.setup_view_helpers", after: :load_config_initializers, group: :all do |app|
app.config.react.jsx_transformer_class ||= React::JSX::DEFAULT_TRANSFORMER
React::JSX.transformer_class = app.config.react.jsx_transformer_class
React::JSX.transform_options = app.config.react.jsx_transform_options
@@ -51,10 +51,10 @@
render_options = options.merge(inline: html)
render(render_options)
end
end
- initializer "react_rails.bust_cache", group: :all do |app|
+ initializer "react_rails.bust_cache", after: :load_config_initializers, group: :all do |app|
asset_variant = React::Rails::AssetVariant.new({
variant: app.config.react.variant,
addons: app.config.react.addons,
})