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