Skip to content

Commit 5bf4929

Browse files
committed
fix: improve message
1 parent 902d9e7 commit 5bf4929

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

client-src/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,17 @@ const onSocketMessage = {
134134
reloadApp(options, status);
135135
},
136136
// TODO: remove in v5 in favor of 'static-changed'
137-
'content-changed': function contentChanged() {
138-
log.info('Content base changed. Reloading...');
137+
'content-changed': function contentChanged(file) {
138+
log.info(
139+
`${file || 'Contents'} from static directory were changed. Reloading...`
140+
);
139141

140142
self.location.reload();
141143
},
142-
'static-changed': function staticChanged() {
143-
log.info('Contents from static directory were changed. Reloading...');
144+
'static-changed': function staticChanged(file) {
145+
log.info(
146+
`${file || 'Contents'} from static directory were changed. Reloading...`
147+
);
144148

145149
self.location.reload();
146150
},

lib/Server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ class Server {
11171117
// disabling refreshing on changing the content
11181118
if (this.options.liveReload) {
11191119
watcher.on('change', () => {
1120-
this.sockWrite(this.sockets, 'static-changed');
1120+
this.sockWrite(this.sockets, 'static-changed', watchPath);
11211121
});
11221122
}
11231123

0 commit comments

Comments
 (0)