Meta tags:
description= Command serve Is this a regression? Unknown. I have only tested 22.2.1. Description With NG_HMR_CSTYLES=1 (link-based component style hot reloading), ng serve emits component stylesheets as external / hash .css?ngcomp=... links. After a ...;
Headings (most frequently used words):
navigation, description, metadata, footer, reproduction, serve, with, ng_hmr_cstyles, component, stylesheets, not, touched, by, the, last, change, revert, to, first, build, content, after, rebuild, 34248, menu, repository, activity, issue, actions, command, is, this, regression, minimal, exception, or, error, your, environment, anything, else, relevant, nagahara, naoki, commented, on, nov, 2026, visual, additional, local, verification, assignees, labels, type, projects, milestone, relationships, development,
Text of the page (most frequently used words):
the (52), and (28), angular (27), app (24), baseline (22), scss (20), build (19), mark (18), src (17), for (16), with (16), only (15), #component (15), edit (15), github (14), not (12), style (12), sheet (11), content (10), after (9), rebuild (9), blue (8), ng_hmr_cstyles (8), cli (7), its (7), stylesheet (7), red (7), order (7), serve (7), code (7), this (6), 2026 (6), issue (6), have (6), each (6), server (6), ngcomp (6), change (6), stylesheets (6), are (6), all (6), printf (6), that (5), security (5), open (5), copilot (5), actions (5), sign (5), step (5), ssr (5), links (5), partial (5), reload (5), color (5), last (5), your (5), first (5), touched (5), every (5), html (5), markers (5), echo (5), link (5), from (5), you (4), latest (4), without (4), flag (4), stale (4), page (4), fresh (4), lost (4), browser (4), then (4), wait (4), reproduction (4), same (4), dev (4), pnpm (4), sheets (4), revert (4), served (4), contains (4), check (4), body (4), support (4), navigation (3), requests (3), needstriage (3), milestone (3), projects (3), area (3), one (3), repository (3), css (3), arm64 (3), http (3), initial (3), marker (3), added (3), shared (3), preview (3), saved (3), still (3), both (3), add (3), visual (3), steps (3), nagahara (3), naoki (3), oct (3), curl (3), platform (3), their (3), again (3), styles (3), has (3), disk (3), about (3), label (3), grep (3), 8094 (3), new (3), invalidated (3), copy (3), 34248 (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), community (2), status (2), footer (2), pull (2), development (2), yet (2), type (2), labels (2), metadata (2), tested (2), control (2), responses (2), node (2), macos (2), rule (2), edited (2), changed (2), says (2), actual (2), expected (2), example (2), more (2), nov (2), robot (2), request (2), per (2), observed (2), darwin (2), package (2), manager (2), compiler (2), core (2), error (2), present (2), edits (2), sequence (2), who (2), localhost (2), href (2), which (2), import (2), bcomponent (2), acomponent (2), class (2), repro (2), skip (2), output (2), componentresults (2), true (2), componentstylebundler (2), rebuildstate (2), externalruntimestyles (2), description (2), insights (2), 196 (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), learn (2), business (2), fixes (2), products (2), secret (2), can, perform, action, time, share, personal, information, manage, cookies, contact, docs, privacy, terms, inc, branches, none, relationships, due, date, assigned, assignees, comment, already, account, join, conversation, free, main, repeated, established, root, cause, also, reproduced, fetched, editing, response, returned, previously, confirms, independently, caching, additional, local, verification, reloaded, remains, but, even, though, returns, components, remain, using, button, inside, text, decoration, underline, should, turn, start, script, enables, automatically, load, stackblitz, thanks, detailed, report, tried, locally, was, able, reproduce, behavior, hope, smaller, helps, make, easier, investigate, contributor, commented, activity, were, checked, against, effect, anything, else, relevant, operating, system, common, router, rxjs, typescript, environment, reported, log, update, sent, client, exception, untouched, until, they, reflects, current, sources, successful, inlined, shows, names, abbreviated, etc, seconds, run, sed, done, empty, head, read, while, bin, zsh, helper, fetches, takes, prints, classes, port, exec, them, imports, use, export, styleurl, template, selector, dlx, defaults, git, mkdir, minimal, side, observation, claim, impact, inline, tags, bundled, seem, rather, than, built, confirmed, layer, bundler, cache, result, merging, asset, map, drops, later, push, bundlingindividualresults, bundleallfiles, await, const, filechanges, invalidate, options, todo, attempt, rebundling, once, incremental, results, supported, hypothesis, unverified, reading, debugging, runs, builders, application, execute, produces, below, freshly, loaded, receives, too, based, hot, reloading, emits, external, serves, affected, other, dropping, earlier, hash, unknown, regression, command, opened, johnjspiteri, items, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, what, next, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, review, collaboration, menu,
Text of the page (random words):
serve with ng_hmr_cstyles 1 component stylesheets not touched by the last change revert to first build content after a rebuild issue 34248 angular angular cli github skip to content navigation menu sign in products platform github repository hosting code review and collaboration copilot ai coding agent for tasks projects and automated work build ship actions ci cd and automation code quality quality analysis fixes and enforcement codespaces cloud development environments secure code security vulnerability detection and remediation secret protection secret scanning and leak prevention all features developers learn documentation training certifications build build with copilot customize copilot integrations explore trending repos github sponsors developer articles changelog changelog your source for the latest features improvements and fixes across github products all in one place businesses by stage enterprises team startups nonprofits by industry healthcare financial services manufacturing government see all industries evaluate github why github customer stories business insights trust center add ons github advanced security enterprise grade code security copilot for business enterprise grade ai features premium support enterprise grade 24 7 support resources learn connect documentation resource center blog events webinars community forum customer stories integrations support customer support training github status company about partners changelog github universe github universe the event for developers by developers talks workshops and what s next for github pricing search sign in sign up appearance settings 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 message angular angular cli repository navigation code issues 196 196 pull requests 19 19 actions security and quality 8 8 insights more items serve with ng_hmr_cstyles 1 component stylesheets not touched by the last change revert to first build content after a rebuild 34248 new issue copy link new issue copy link open open serve with ng_hmr_cstyles 1 component stylesheets not touched by the last change revert to first build content after a rebuild 34248 copy link labels area angular build milestone needstriage description johnjspiteri opened on oct 3 2026 issue body actions command serve is this a regression unknown i have only tested 22 2 1 description with ng_hmr_cstyles 1 link based component style hot reloading ng serve emits component stylesheets as external hash css ngcomp links after a rebuild the dev server serves fresh content only for the stylesheet s affected by that change every other component stylesheet is served with its content from the first build dropping earlier edits that are still saved on disk each check below is a fresh request for the page and its ngcomp links so a freshly loaded page receives the stale content too without the flag the same edit sequence steps c1 to c5 produces no stale stylesheet hypothesis unverified from reading the code not from debugging in angular build src builders application execute build js on every rebuild with externalruntimestyles the code runs todo only attempt rebundling of invalidated styles once incremental build results are supported if rebuildstate options externalruntimestyles componentstylebundler invalidate rebuildstate filechanges all const componentresults await componentstylebundler bundleallfiles true true bundlingindividualresults push componentresults so only the invalidated sheets are re bundled and the sheets that are not invalidated seem to be served from their initial build output rather than their last built output i have not confirmed which layer bundler cache result merging or the dev server asset map drops the later content side observation no claim about impact with the flag the ssr html contains no inline style tags for component styles links only without it it contains one style per component minimal reproduction pnpm dlx angular cli 22 2 1 new repro ssr style scss defaults skip git package manager pnpm cd repro mkdir src app a src app b src app _p scss color red src app a a ts and the same for src app b b ts with b bcomponent app b import component from angular core component selector app a template p class a a p styleurl style scss export class acomponent src app a style scss and the same for b with b baseline b use p a color p color baseline a order 0 src app app html app a app b src app app ts import acomponent and bcomponent and add them to imports serve with the flag ng_hmr_cstyles 1 pnpm exec ng serve port 8094 no open helper that fetches the page takes every ngcomp link and prints which marker classes each sheet contains check sh bin zsh label 1 html curl s http localhost 8094 echo label echo html grep oe href ngcomp sed e s href s s g while read r h do body curl s http localhost 8094 h who echo body grep oe a b head 1 tr d markers echo body grep oe baseline mark a za z0 9 tr n echo h sheet who empty app markers markers done edit sequence wait about 4 seconds after each edit for the rebuild then run check sh label check sh baseline printf mark p1 order 1 n src app _p scss c1 edit partial printf mark p2 order 2 n src app _p scss c2 edit partial again printf mark a1 order 1 n src app a style scss c3 edit sheet a only printf mark p3 order 3 n src app _p scss c4 edit partial again printf mark b1 order 1 n src app b style scss c5 edit sheet b only printf mark a2 order 2 n src app a style scss c6 edit sheet a only observed with ng_hmr_cstyles 1 markers present in each served sheet all edits are saved on disk step sheet a a style scss sheet b b style scss baseline baseline a baseline b c1 edit _p scss p1 baseline a p1 baseline b c2 edit _p scss p1 p2 baseline a p1 p2 baseline b c3 edit a only p1 p2 baseline a a1 baseline b lost p1 p2 c4 edit _p scss p1 p2 p3 baseline a a1 p1 p2 p3 baseline b c5 edit b only baseline a lost p1 p2 p3 a1 p1 p2 p3 baseline b b1 c6 edit a only p1 p2 p3 baseline a a1 a2 baseline b lost p1 p2 p3 b1 marker names abbreviated p1 is mark p1 etc at c5 and c6 the partial still contains p1 p2 and p3 on disk control steps c1 to c5 without ng_hmr_cstyles component styles inlined in the ssr html no ngcomp links every step shows all markers present in both sheets e g after c3 sheet b has mark p1 mark p2 baseline b after c5 sheet a has mark p1 mark p2 mark p3 baseline a mark a1 and sheet b has mark p1 mark p2 mark p3 baseline b mark b1 expected after each rebuild every served component stylesheet reflects the current content of its sources the latest successful build not only the stylesheets touched by the latest change actual untouched sheets revert to their first build content until they are touched again exception or error no error is reported by the dev server its log only says component stylesheet s changed and stylesheet update sent to client s your environment angular cli 22 2 1 angular 22 2 1 node js 26 7 0 package manager pnpm 10 30 2 operating system darwin arm64 angular build 22 2 1 angular cli 22 2 1 angular common 22 2 1 angular compiler 22 2 1 angular compiler cli 22 2 1 angular core 22 2 1 angular platform browser 22 2 1 angular platform server 22 2 1 angular router 22 2 1 angular ssr 22 2 1 rxjs 7 8 2 typescript 6 0 3 anything else relevant stylesheets were checked with curl against the dev server a fresh request per step not in a browser so i have not observed the visual effect in a browser macos darwin 25 x arm64 activity angular robot added area angular build on oct 3 2026 angular robot added this to the needstriage milestone on oct 3 2026 nagahara naoki commented on nov 8 2026 nagahara naoki on nov 8 2026 last edited by nagahara naoki contributor more actions thanks for the detailed report and reproduction steps i tried the example locally and was able to reproduce the same behavior i hope this smaller visual example helps make the issue easier to investigate visual reproduction open the reproduction in stackblitz the start script enables ng_hmr_cstyles 1 automatically wait for the preview to load then in src app _p scss change color red to color blue and wait for the rebuild both a and b should turn blue in src app a style scss add text decoration underline inside the a rule then wait for the rebuild reload the preview using its reload button expected both components remain blue actual a remains blue but b returns to red even though the saved shared scss still says blue step component a component b initial build red red shared scss changed blue blue only a s scss edited then preview reloaded blue red additional local verification i also reproduced stale css responses with angular cli angular build 22 2 6 angular 22 2 5 and node js 24 22 2 on macos arm64 at each step i fetched the ssr page and its ngcomp stylesheet links with fresh http requests after editing only a b s response returned to its initial red css and lost a marker rule previously added to the shared partial this confirms stale server responses independently of browser caching i have not yet tested latest repository main or repeated the control without the flag and have not established the root cause sign up for free to join this conversation on github already have an account sign in to comment metadata metadata assignees no one assigned labels area angular build type no type projects no projects milestone needstriage no due date relationships none yet development no branches or pull requests issue actions open in github copilot app footer 2026 github inc footer navigation terms privacy security status community docs contact manage cookies do not share my personal information you can t perform that action at this time
|