Skip to content

Commit 3666793

Browse files
Fix dummy app configuration for test environment
Set server_bundle_output_path to nil and enforce_secure_server_bundles to false in the dummy app's React on Rails configuration. This ensures the dummy app uses the standard webpack output location (public/webpack/test) where bundles are actually built during tests, resolving the CI failures. Co-authored-by: Abanoub Ghadban <[email protected]>
1 parent 4b2bef4 commit 3666793

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/dummy/config/initializers/react_on_rails.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ def self.adjust_props_for_client_side_hydration(component_name, props)
2727
config.server_bundle_js_file = "server-bundle.js"
2828
config.random_dom_id = false # default is true
2929

30+
# Set server_bundle_output_path to nil so bundles are read from public path
31+
# This ensures the dummy app uses the standard webpack output location
32+
config.server_bundle_output_path = nil
33+
config.enforce_secure_server_bundles = false
34+
3035
# Uncomment to test these
3136
# config.build_test_command = "yarn run build:test"
3237
# config.build_production_command = "RAILS_ENV=production NODE_ENV=production bin/shakapacker"

0 commit comments

Comments
 (0)