Fix infinite reload when context path isn't root in localhost (#744)
This commit is contained in:
parent
8337591a66
commit
8334d36f34
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ export function register(config?: Config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', () => {
|
window.addEventListener('load', () => {
|
||||||
const swUrl = `${process.env.PUBLIC_URL}/sw.js`;
|
const swUrl = `./sw.js`;
|
||||||
|
|
||||||
if (isLocalhost) {
|
if (isLocalhost) {
|
||||||
// This is running on localhost. Let's check if a service worker still exists or not.
|
// This is running on localhost. Let's check if a service worker still exists or not.
|
||||||
|
|
Loading…
Reference in a new issue