Skip to content

Commit 8168ae2

Browse files
committed
feat(@angular-devkit/build-angular): apply global CSS updates without 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.
1 parent eef2d16 commit 8168ae2

File tree

1 file changed

+1
-1
lines changed
  • packages/angular_devkit/build_angular/src/builders/dev-server

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/builders/dev-server/vite-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function handleUpdate(
161161
return;
162162
}
163163

164-
if (serverOptions.hmr) {
164+
if (serverOptions.liveReload || serverOptions.hmr) {
165165
if (updatedFiles.every((f) => f.endsWith('.css'))) {
166166
const timestamp = Date.now();
167167
server.ws.send({

0 commit comments

Comments
 (0)