mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 23:12:22 +03:00
Send message for clients to hot reload after deleting or adding a new route.
This commit is contained in:
parent
9585e41d9a
commit
12e5f88e10
@ -116,6 +116,19 @@ async function start(options) {
|
||||
if (needToRerunCodegen(eventName, pathThatChanged)) {
|
||||
try {
|
||||
await codegen.generate();
|
||||
clientElmMakeProcess = compileElmForBrowser();
|
||||
pendingCliCompile = compileCliApp();
|
||||
|
||||
Promise.all([clientElmMakeProcess, pendingCliCompile])
|
||||
.then(() => {
|
||||
elmMakeRunning = false;
|
||||
})
|
||||
.catch(() => {
|
||||
elmMakeRunning = false;
|
||||
});
|
||||
clients.forEach((client) => {
|
||||
client.response.write(`data: elm.js\n\n`);
|
||||
});
|
||||
} catch (error) {
|
||||
codegenError = error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user