Skip to content

Commit da1fa52

Browse files
Change default defer behavior for generated component packs
1 parent eb1daef commit da1fa52

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/guides/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ ReactOnRails.configure do |config|
189189
# config.server_bundle_js_file for the filename.
190190
config.make_generated_server_bundle_the_entrypoint = false
191191

192-
# Default is true, which matches Webpacker/Shakapacker's defer default for `append_javascript_pack`
193-
# Set this to false to have `defer: false` added to your `append_javascript_pack` calls for generated entrypoints.
194-
config.defer_generated_component_packs = true
192+
# Default is false
193+
# Set this to true to have `defer: true` added to your `append_javascript_pack` calls for generated entrypoints.
194+
config.defer_generated_component_packs = false
195195

196196
################################################################################
197197
# I18N OPTIONS

lib/react_on_rails/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def self.configuration
4343
i18n_output_format: nil,
4444
components_subdirectory: nil,
4545
make_generated_server_bundle_the_entrypoint: false,
46-
defer_generated_component_packs: true,
46+
defer_generated_component_packs: false,
4747
# forces the loading of React components
4848
force_load: true,
4949
# Maximum time in milliseconds to wait for client-side component registration after page load.

0 commit comments

Comments
 (0)