Repository navigation
feat(dev): support on-demand SSR imports - #158
Open
ScriptedAlchemy wants to merge 19 commits into
Open
ScriptedAlchemy wants to merge 19 commits into
ScriptedAlchemy wants to merge 19 commits into
Conversation
Keep activation provenance, native runtime updates, and paired Web publication under the existing generation owner. Gates retain original promises through concurrent lazy requests and reject source supersession, failed compilation, and shutdown. The controller gains lifecycle branches. Ripwire still flags controller complexity and recent generation churn. Keep the shared session binding cohesive rather than extract callbacks solely to reduce the metric. The native and controller regressions cover these paths; no quality acknowledgment or baseline reset was added.
Contributor
Benchmark results
|
commit: |
Merging this PR will not alter performance
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
For issue #155, compile optional SSR imports on demand and keep the original request suspended through activation. A second tab must not reset an unrelated page.
What changed
unstableServerLazyCompilationfor classic SSR, with eager entries and a retained native runtime in both module formats.Scope
This branch pins the Rsbuild preview and a published Rspack canary with matching native bindings. The canary combines watch origins with the lazy HMR identity fix, replacing the local patch. The upstream PRs remain unmerged.
The feature defaults to false. RSC, federation, custom lazy clients or backends, and cold imports before initial publication are unsupported. After a rejected activation, cold imports can require a server source edit to recover. ESM caches persist until process restart. Recovery preserves accepted exports. Arbitrary application side effects can persist.
Blast Radius
The controller gains lifecycle branches to preserve one session and generation owner. Structural review still flags controller complexity and recent churn. No metric acknowledgment or baseline reset hides these findings.
Verification
pnpm build,pnpm typecheck,pnpm test:core, andpnpm test:package-interoppass. Core has 899 passing cases, including 36 real native CJS/ESM cases. macOS uses a physicalTMPDIRas documented.Native
serverBundlescoverage verifies activation, SSR, and source replacement in a selected bundle. Isolation between multiple active bundles remains untested. The published canary also passes the parent-accept compiler reproduction in CJS and ESM through activation and a later accepted edit.