Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 79e08c7

Browse files
Merge pull request #834 from cdr/fix-sw-path
Fix service worker path
2 parents 3f2ad7b + 9b5a43e commit 79e08c7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎packages/web/src/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
if ("serviceWorker" in navigator) {
3030
// Use the window load event to keep the page load performant
3131
window.addEventListener("load", () => {
32-
navigator.serviceWorker.register("/service-worker.js");
32+
navigator.serviceWorker.register('service-worker.js',{scope: './'});
3333
});
3434
}
3535
</script>

‎scripts/webpack.client.config.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ module.exports = (options = {}) => merge(
6868
})
6969
].concat(prod ? [
7070
new GenerateSW({
71+
importWorkboxFrom: "local",
7172
include: [cachePattern],
7273
runtimeCaching: [{
7374
urlPattern: cachePattern,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /