Skip to content

Commit

Permalink
feat(@angular-devkit/build-angular): apply global CSS updates without…
Browse files Browse the repository at this point in the history
… a live-reload when using `vite`

This commit changes the way that global style updates are applied when using `vite`.  When either live-reload or hmr are enabled the styles are replaced in placed (HMR style) without a live-reload.
  • Loading branch information
alan-agius4 committed Sep 20, 2023
1 parent eef2d16 commit 8168ae2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function handleUpdate(
return;
}

if (serverOptions.hmr) {
if (serverOptions.liveReload || serverOptions.hmr) {
if (updatedFiles.every((f) => f.endsWith('.css'))) {
const timestamp = Date.now();
server.ws.send({
Expand Down

0 comments on commit 8168ae2

Please sign in to comment.