Merge pull request #753 from everyx/master
fix: infinite refreshing when host at subpath
This commit is contained in:
commit
e533e8e959
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ export function register(config?: Config) {
|
|||
}
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
const swUrl = `./sw.js`;
|
||||
const swUrl = new URL('sw.js', publicUrl.href).href;
|
||||
|
||||
if (isLocalhost) {
|
||||
// This is running on localhost. Let's check if a service worker still exists or not.
|
||||
|
|
Loading…
Reference in a new issue