You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address code review feedback: improve robustness and code quality
Code Review Improvements:
- Enhanced auto-detection to warn when user explicitly configures
server_bundle_output_path differently from Shakapacker's private_output_path
- Improved webpack config template readability by extracting path logic
to named constant instead of inline ternary
- Added warning for edge case of absolute paths outside Rails.root
- Enhanced documentation for shakapacker_version_9_or_higher? method
explaining optimistic default behavior and fallback logic
- Fixed long line in configuration.md documentation (187 chars -> multi-line)
Test Coverage:
- Added 5 tests for auto-detection warning functionality
- Added 2 tests for absolute path warning in normalize_to_relative_path
- All tests pass, zero RuboCop offenses
Changes maintain backward compatibility while providing better user guidance
through actionable warning messages.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
# When set to true, React on Rails will only load server bundles from private, explicitly configured directories (such as `ssr-generated`), and will raise an error if a server bundle is found in a public or untrusted location. This helps prevent accidental or malicious execution of untrusted JavaScript on the server, and is strongly recommended for production environments. And prevent leakage of server-side code to the client (Especially in the case of RSC).
131
-
# Default is false for backward compatibility, but enabling this option is a best practice for security.
130
+
# When set to true, React on Rails will only load server bundles from private, explicitly
131
+
# configured directories (such as `ssr-generated`), and will raise an error if a server
132
+
# bundle is found in a public or untrusted location. This helps prevent accidental or
133
+
# malicious execution of untrusted JavaScript on the server, and is strongly recommended
134
+
# for production environments. Also prevents leakage of server-side code to the client
135
+
# (especially important for React Server Components).
136
+
# Default is false for backward compatibility, but enabling this option is a best practice
0 commit comments