Added realtime watching capabilites to vite's virtual loaders
This commit is contained in:
parent
39071d425e
commit
189857759e
@ -5,10 +5,10 @@
|
|||||||
let isStoreLoaded = false;
|
let isStoreLoaded = false;
|
||||||
|
|
||||||
$: if (services && services.helloEarthAlert) {
|
$: if (services && services.helloEarthAlert) {
|
||||||
// services.helloEarthAlert.alertMe();
|
services.helloEarthAlert.alertMe();
|
||||||
}
|
}
|
||||||
$: if (services.core) {
|
$: if (services.core) {
|
||||||
// services.core.testAlert();
|
services.core.testAlert();
|
||||||
}
|
}
|
||||||
|
|
||||||
$: if ($store) isStoreLoaded = true;
|
$: if ($store) isStoreLoaded = true;
|
||||||
|
@ -46,7 +46,15 @@ export default defineConfig({
|
|||||||
return `export default ${JSON.stringify(components)};`;
|
return `export default ${JSON.stringify(components)};`;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
},
|
||||||
|
handleHotUpdate({ file, server }) { // Add handleHotUpdate to watch for file changes
|
||||||
|
if (file.startsWith(resolve(__dirname, 'src/lib/components'))) {
|
||||||
|
server.ws.send({
|
||||||
|
type: 'full-reload',
|
||||||
|
path: '*',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'services-resolver',
|
name: 'services-resolver',
|
||||||
@ -70,7 +78,15 @@ export default defineConfig({
|
|||||||
return `export default ${JSON.stringify(services)};`;
|
return `export default ${JSON.stringify(services)};`;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
},
|
||||||
|
handleHotUpdate({ file, server }) { // Add handleHotUpdate to watch for file changes
|
||||||
|
if (file.startsWith(resolve(__dirname, 'src/lib/services'))) {
|
||||||
|
server.ws.send({
|
||||||
|
type: 'full-reload',
|
||||||
|
path: '*',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'data-sources-resolver',
|
name: 'data-sources-resolver',
|
||||||
@ -102,3 +118,4 @@ export default defineConfig({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user