diff --git a/packages/web/src/index.html b/packages/web/src/index.html
index 4e8473b5..7928be13 100644
--- a/packages/web/src/index.html
+++ b/packages/web/src/index.html
@@ -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: './'});
});
}
diff --git a/scripts/webpack.client.config.js b/scripts/webpack.client.config.js
index 31ab2a7e..b3b88570 100644
--- a/scripts/webpack.client.config.js
+++ b/scripts/webpack.client.config.js
@@ -68,6 +68,7 @@ module.exports = (options = {}) => merge(
})
].concat(prod ? [
new GenerateSW({
+ importWorkboxFrom: "local",
include: [cachePattern],
runtimeCaching: [{
urlPattern: cachePattern,