Summary
Follow-up to #4227 and #4234.
Related longer-term RSC/Rspack architecture tracking: #3488 and #3553.
react_on_rails:doctor:rsc currently recognizes only the generated literal Rspack dev config pattern:
clientWebpackConfig.lazyCompilation = false;
Equivalent custom configs can produce an effective lazyCompilation: false final Rspack config, but doctor still warns:
Rspack lazyCompilation can leave the RSC client manifest empty in normal bin/dev mode.
config/rspack/development.js does not appear to disable lazyCompilation while the dev server is running.
Why this matters
Generated RSC + Rspack apps are OK after the dev-server lazy-compilation fix. This is narrower: apps that customize their Rspack config can get misleading doctor output even when lazy compilation is actually disabled or intentionally excluded for RSC-critical modules.
This is not urgent runtime breakage, but it can confuse advanced users and future RSC/Rspack work.
Empirical check
Fresh RORP + RSC + Rspack app generated from current main after #4234.
For each variant, I reset generated Rspack config files, applied one config shape, evaluated the real final Rspack config under WEBPACK_SERVE=true, then ran:
bundle exec rails react_on_rails:doctor:rsc
Result matrix:
| Variant |
Effective Rspack lazyCompilation |
Doctor lazy check |
| Generated literal assignment |
false |
✅ success |
clientWebpackConfig.lazyCompilation = { entries: false, imports: false } |
object disables both |
⚠️ warns |
Object.assign(clientWebpackConfig, { lazyCompilation: false }) |
false |
⚠️ warns |
| helper function in separate file |
false |
⚠️ warns |
ternary rscWebpackConfig ? false : ... |
false |
⚠️ warns |
object with custom test() excluding RSC refs |
object/function |
⚠️ warns |
disabled in clientWebpackConfig.js |
false |
⚠️ warns |
disabled in rspack.config.js after env config loads |
false |
⚠️ warns |
| no disable control |
unset |
⚠️ warns |
Expected
Doctor should either:
- detect the final effective Rspack dev-server config more accurately, or
- make the warning wording explicit that it only failed to find the generated literal config pattern.
Actual
Doctor warning implies lazy compilation is not disabled even when the final evaluated config has lazyCompilation: false.
Notes
The test(module) row only proves the detector cannot recognize that category. It does not claim every custom test() predicate is safe for every app.
This should probably be P3/fix-later unless maintainers want doctor polish now.
Summary
Follow-up to #4227 and #4234.
Related longer-term RSC/Rspack architecture tracking: #3488 and #3553.
react_on_rails:doctor:rsccurrently recognizes only the generated literal Rspack dev config pattern:Equivalent custom configs can produce an effective
lazyCompilation: falsefinal Rspack config, but doctor still warns:Why this matters
Generated RSC + Rspack apps are OK after the dev-server lazy-compilation fix. This is narrower: apps that customize their Rspack config can get misleading doctor output even when lazy compilation is actually disabled or intentionally excluded for RSC-critical modules.
This is not urgent runtime breakage, but it can confuse advanced users and future RSC/Rspack work.
Empirical check
Fresh RORP + RSC + Rspack app generated from current
mainafter #4234.For each variant, I reset generated Rspack config files, applied one config shape, evaluated the real final Rspack config under
WEBPACK_SERVE=true, then ran:bundle exec rails react_on_rails:doctor:rscResult matrix:
lazyCompilationfalseclientWebpackConfig.lazyCompilation = { entries: false, imports: false }Object.assign(clientWebpackConfig, { lazyCompilation: false })falsefalserscWebpackConfig ? false : ...falsetest()excluding RSC refsclientWebpackConfig.jsfalserspack.config.jsafter env config loadsfalseExpected
Doctor should either:
Actual
Doctor warning implies lazy compilation is not disabled even when the final evaluated config has
lazyCompilation: false.Notes
The
test(module)row only proves the detector cannot recognize that category. It does not claim every customtest()predicate is safe for every app.This should probably be P3/fix-later unless maintainers want doctor polish now.