Skip to content

Commit d240a70

Browse files
committed
commands: Avoid full browser refresh on simple CSS changes
1 parent bbcc2a7 commit d240a70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commands/hugobuilder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ func (c *hugoBuilder) handleEvents(watcher *watcher.Batcher,
962962
lrl.Logf("no page to navigate to, force refresh")
963963
livereload.ForceRefresh()
964964
}
965-
} else if len(otherChanges) > 0 {
965+
} else if len(otherChanges) > 0 || len(cssChanges) > 0 {
966966
if len(otherChanges) == 1 {
967967
// Allow single changes to be refreshed without a full page reload.
968968
pathToRefresh := h.PathSpec.RelURL(paths.ToSlashTrimLeading(otherChanges[0]), false)

0 commit comments

Comments
 (0)