feat(metassr-server): implement granular CSS rebuild in dev mode#107
Open
abhicodes0324 wants to merge 1 commit intometacall:masterfrom
Open
feat(metassr-server): implement granular CSS rebuild in dev mode#107abhicodes0324 wants to merge 1 commit intometacall:masterfrom
abhicodes0324 wants to merge 1 commit intometacall:masterfrom
Conversation
Signed-off-by: Abhiswant Chaudhary <abhicodes0324@gmail.com>
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.
Summary
RebuildType::Stylepreviously logged a warning and did nothing - any CSS change in dev mode was silently ignored and the browser never updated styles. This PR implements it.Changes
rebuilder.rsrebuild_styles()- re-runs the client-side bundle viaClientBuilderso Rspack picks up the changed CSS. Only the client bundle runs - no server-side rebuild is triggeredRebuildType::Stylearm now callsrebuild_styles()and broadcastsRebuildType::Styleto connected WebSocket clientsstylemessage andreloadStylesheets()fires a CSS-only reload - no full page refreshPagedoc comment (providied→provided)//comments on enum variants to///doc commentsHow to verify
metassr devinsidetests/web-app/src/styles/style.css?t=<timestamp>request fires without a full page reloadNotes
reloadStylesheets()on the client works correctlyrebuild_styles()currently passes""as the root path toClientBuilder(same asrebuild_page()) - this will be fixed in a follow-up PRChecklist
Style RebuildTODO item inTODO.mdmap_path_to_typeand broadcast pathcargo clippycleancargo fmtapplied