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
Tighten Pro webpack + initializer setup from reference audit
Four fixes from auditing Sub-PR 2 against the Pro dummy, the :pro
generator, and the Pro configuration docs.
- config/initializers/react_on_rails_pro.rb: renderer_password now
raises in non-local envs instead of falling back to the dev string.
Previously any production deploy that forgot to set the env var would
silently run with a known-public password; now it fails loudly.
Matches the safer pattern from PR #723's final state.
- config/webpack/serverWebpackConfig.js: pass clientReferences to
RSCWebpackPlugin({ isServer: true }), matching the Pro dummy's
serverWebpackConfig at `react_on_rails_pro/spec/dummy/config/webpack/
serverWebpackConfig.js`. Without it, the plugin may walk into
node_modules and hit unlodaed .tsx source files and re-scan modules
we don't need. Locks client-ref discovery to client/app/**.
- config/webpack/serverWebpackConfig.js: drop publicPath from the
server-bundle output. Server bundles are loaded by the Node renderer
via the filesystem, never served over HTTP — the URL is unused.
Matches the Pro dummy's comment.
- package.json: pin react-on-rails-rsc to 19.0.4 stable (was ^19.0.4
range) and add "node-renderer" npm script as a convenience shortcut
for `node renderer/node-renderer.js`.
- .github/workflows/rspec_test.yml: set RENDERER_PASSWORD explicitly in
CI to the shared dev default so both the initializer and the launcher
use the same concrete value, avoiding silent drift if either side's
default is ever touched.
Re-verified: webpack build clean; renderer + Rails boot; GET / returns
HTTP 200 with "Node Renderer responded" in the Rails log and
"[SERVER] RENDERED" in the renderer log, confirming SSR still goes
through the Pro path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments