Skip to content

Commit d770bfc

Browse files
ihabadhamjustin808
authored andcommitted
enable auto-registered bundles by default - set components_subdirectory - set nested_entries to true
1 parent 0da52cb commit d770bfc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ ReactOnRails.configure do |config|
4949
################################################################################
5050
# `components_subdirectory` is the name of the matching directories that contain automatically registered components
5151
# for use in the Rails views. The default is nil, you can enable the feature by updating it in the next line.
52-
# config.components_subdirectory = "ror_components"
52+
config.components_subdirectory = "ror_components"
5353
#
5454
# For automated component registry, `render_component` view helper method tries to load bundle for component from
5555
# generated directory. default is false, you can pass option at the time of individual usage or update the default
5656
# in the following line
57-
config.auto_load_bundle = false
57+
config.auto_load_bundle = true
5858
end

lib/generators/react_on_rails/templates/base/base/config/shakapacker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ default: &default
77
public_output_path: packs
88
cache_path: tmp/shakapacker
99
webpack_compile_output: true
10+
nested_entries: true
1011

1112
# Additional paths webpack should lookup modules
1213
# ['app/assets', 'engine/foo/app/assets']

0 commit comments

Comments
 (0)