mirror of https://git.tuxpa.in/a/code-server.git
commit
79e08c74ed
|
@ -29,7 +29,7 @@
|
||||||
if ("serviceWorker" in navigator) {
|
if ("serviceWorker" in navigator) {
|
||||||
// Use the window load event to keep the page load performant
|
// Use the window load event to keep the page load performant
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
navigator.serviceWorker.register("/service-worker.js");
|
navigator.serviceWorker.register('service-worker.js', {scope: './'});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -68,6 +68,7 @@ module.exports = (options = {}) => merge(
|
||||||
})
|
})
|
||||||
].concat(prod ? [
|
].concat(prod ? [
|
||||||
new GenerateSW({
|
new GenerateSW({
|
||||||
|
importWorkboxFrom: "local",
|
||||||
include: [cachePattern],
|
include: [cachePattern],
|
||||||
runtimeCaching: [{
|
runtimeCaching: [{
|
||||||
urlPattern: cachePattern,
|
urlPattern: cachePattern,
|
||||||
|
|
Loading…
Reference in New Issue