Skip to content

Commit 816cbba

Browse files
docs: simplify server_bundle_output_path configuration documentation
- Focus on key message that default will change to "ssr-generated" - Note that warning will be shown if left as nil - Remove unnecessary implementation details about fallback order - Simplify enforcement requirements Co-authored-by: Justin Gordon <[email protected]>
1 parent d6536ab commit 816cbba

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

docs/guides/configuration.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -136,27 +136,18 @@ ReactOnRails.configure do |config|
136136
# Directory where server bundles will be output during build process.
137137
# This allows organizing server-side rendering assets separately from client assets.
138138
#
139-
# Default is nil, which uses standard fallback locations in this priority order:
140-
# 1. Environment-specific path (e.g., public/webpack/test)
141-
# 2. Standard Shakapacker location (public/packs)
142-
# 3. Generated assets path (for legacy setups)
139+
# IMPORTANT: The default of nil will change to "ssr-generated" in the next major version.
140+
# A warning will be shown if this is left as nil.
143141
#
144-
# Example configurations:
145-
# config.server_bundle_output_path = "ssr-generated" # Private directory (recommended)
146-
# config.server_bundle_output_path = "app/assets/builds" # Custom private location
147-
# config.server_bundle_output_path = nil # Use fallback locations (default)
148-
config.server_bundle_output_path = nil
142+
# Recommended configuration:
143+
config.server_bundle_output_path = "ssr-generated"
149144

150145
# When enabled, enforces that server bundles are only loaded from private, designated locations
151146
# to prevent potential security risks from loading untrusted server-side code.
152147
#
153-
# SECURITY IMPORTANT: When enabled, server bundles bypass public directory fallbacks
154-
# and are only loaded from the configured server_bundle_output_path.
155-
#
156148
# Requirements when enabled:
157-
# - server_bundle_output_path must be set to a non-nil value
158-
# - server_bundle_output_path must point to a location outside the public directory
159-
# - Recommended for production environments where security is critical
149+
# - server_bundle_output_path must be set (cannot be nil)
150+
# - server_bundle_output_path must point outside the public directory
160151
#
161152
# Default is false for backward compatibility.
162153
config.enforce_private_server_bundles = false

0 commit comments

Comments
 (0)