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
Refs #153. Serve development entry and route CSS through retained content-addressed paths so a document preload cannot revive edited bytes after an exact source restoration.
Keep genuine ownership-removal reloads, but publish CSS byte-version changes through the committed-manifest HMR-idle queue.
Replay the last committed entry/route manifest on reconnect.
Disable the extract loader's fallback HMR code via the NormalModule loader hook only for the web development environment with Router HMR enabled. Router owns stylesheet updates there; the fallback's global link scan must not remove React-owned DOM nodes. Other loader pipelines, production, and RSC are unchanged by this hook.
Include a Changeset and real-browser edit/preload/restore/remount tests for plain CSS and Vanilla Extract, checking retained bytes, document identity, input state, and browser errors.
The reproduction candidate linked from #153 informed this implementation. Direct immutable paths replace its canonical URL/query middleware. No dependencies or native binaries are patched.
All 844 core tests passed (TMPDIR=/private/tmp avoids macOS temporary-path alias assertions).
All 15 CSS/lazy-loading browser matrix tests passed, including both CSS-with-JS cases that failed original CI.
Both plain-CSS and Vanilla Extract exact-restoration browser regressions passed.
Broader local HMR tests have shown loader-update timeouts at different steps; those results are not reported as passing. Full ecosystem and fresh CI validation are in progress. Keep draft until the final head is green and these checks are accounted for.
The original canonical-query approach reproduced a native Rspack/React removeChild conflict. Direct paths avoided that path; the subsequent Vanilla Extract fallback conflict is addressed by the loader hook in 71e5e3a. Upstream Rspack #15879 remains useful but this implementation no longer requires its unreleased patch to pass the CSS matrix.
#140 remains independent and blocked on Rsbuild #8496; this PR does not implement runtime reuse.
The CSS CI failure is fixed locally by disabling extract-loader fallback HMR through the NormalModule loader hook only in the web development environment where Router handles committed CSS manifests. No dependency source patch or test skip is used. All 15 CSS/lazy-loading matrix tests pass, including both Vanilla Extract state-preservation cases. Added exact edit/preload/restore coverage for Vanilla Extract; both variants pass. Build, full typechecking, and 844 core tests pass. A broader local HMR run has hit loader-update timeouts and remains under investigation; the PR stays draft while CI and broader validation run.
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
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.
Summary
Refs #153. Serve development entry and route CSS through retained content-addressed paths so a document preload cannot revive edited bytes after an exact source restoration.
The reproduction candidate linked from #153 informed this implementation. Direct immutable paths replace its canonical URL/query middleware. No dependencies or native binaries are patched.
Validation at 71e5e3a
TMPDIR=/private/tmpavoids macOS temporary-path alias assertions).The original canonical-query approach reproduced a native Rspack/React
removeChildconflict. Direct paths avoided that path; the subsequent Vanilla Extract fallback conflict is addressed by the loader hook in 71e5e3a. Upstream Rspack #15879 remains useful but this implementation no longer requires its unreleased patch to pass the CSS matrix.#140 remains independent and blocked on Rsbuild #8496; this PR does not implement runtime reuse.