Skip to content

feat(builder): accept and forward the dev-server hmr option (#145) - #188

Merged
lukekania merged 2 commits into
milestone/v0.11.0-builder-parityfrom
feat/builder-hmr-option
Jun 10, 2026
Merged

feat(builder): accept and forward the dev-server hmr option (#145)#188
lukekania merged 2 commits into
milestone/v0.11.0-builder-parityfrom
feat/builder-hmr-option

Conversation

@lukekania

Copy link
Copy Markdown
Owner

Summary

Closes the builder-side gap in #145. The Rust implementation of HMR landed in #185/#186/#187, but the Architect builder still rejected the hmr option at schema-validation time (additionalProperties: false in dev-server.json) and never forwarded a flag — so ng serve users could not reach any of it. ngc-rs serve --hmr worked; ng serve with hmr: true hard-failed.

Changes

  • packages/builder/schemas/dev-server.json: declare hmr (boolean, no default).
  • packages/builder/src/serve/options.ts: tri-state forwarding — hmr: true--hmr, hmr: false--no-hmr, unset → no flag, letting the binary inherit architect.serve.options.hmr from angular.json (its existing fallback).
  • Tests for all three states in serve/__tests__/options.test.ts (28 passing).
  • chore: version bump to 0.10.18.

Verification (test-ng-project, via the builder)

  • hmr: true in serve options: schema accepts it, spawned binary logs ngc-rs HMR enabled, served page contains the HMR runtime.
  • Editing src/styles.scss emits css-update over SSE (no reload).
  • Editing src/app/app.html emits angular:component-update for App (no reload).
  • ng serve --no-hmr overrides hmr: true from angular.json (no HMR banner) — CLI passthrough via the schema works both ways.

The Rust side of HMR landed in PRs #185-#187, but the Architect builder
still rejected `hmr` at schema validation (additionalProperties: false)
and never forwarded a flag, so `ng serve` users could not reach it.

- schemas/dev-server.json: declare `hmr` (boolean, no default)
- serve/options.ts: tri-state forwarding — true → --hmr, false →
  --no-hmr, unset → nothing (binary inherits architect.serve.options.hmr
  from angular.json)
@lukekania
lukekania merged commit eadd4ff into milestone/v0.11.0-builder-parity Jun 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant