File tree 1 file changed +2
-0
lines changed
1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ class Railtie < ::Rails::Railtie
9
9
config . react . variant = ( ::Rails . env . production? ? :production : :development )
10
10
config . react . addons = false
11
11
config . react . jsx_transform_options = { }
12
+ config . react . jsx_transformer_class = React ::JSX ::BabelTransformer
12
13
# Server rendering:
13
14
config . react . server_renderer_pool_size = 10
14
15
config . react . server_renderer_timeout = 20 # seconds
@@ -23,6 +24,7 @@ class Railtie < ::Rails::Railtie
23
24
# Include the react-rails view helper lazily
24
25
initializer "react_rails.setup_view_helpers" , group : :all do |app |
25
26
React ::JSX . transform_options = app . config . react . jsx_transform_options
27
+ React ::JSX . transformer_class = app . config . react . jsx_transformer_class
26
28
ActiveSupport . on_load ( :action_view ) do
27
29
include ::React ::Rails ::ViewHelper
28
30
end
You can’t perform that action at this time.
0 commit comments