This commit is contained in:
Morten Olsen
2023-03-29 15:00:24 +02:00
parent a04d5f5d71
commit 35ef204433
12 changed files with 441 additions and 48 deletions

View File

@@ -0,0 +1,9 @@
import EventSource from 'eventsource';
const path = encodeURIComponent(window.location.pathname);
const source = new EventSource(`/dev?path=${path}`);
source.onmessage = (msg) => {
if (msg.data === 'reload') {
window.location.reload();
}
};