fix service-worker.js path with basePath
This commit is contained in:
parent
f9d2e95e5a
commit
e5319af831
@ -8,6 +8,7 @@ import initializeApollo from '@/apollo/client';
|
||||
import { Loading, Notification } from '@/Components/Common';
|
||||
import Layout from '@/Components/Layout';
|
||||
import { theme } from '@/config/ui';
|
||||
import { withBasePath } from '@/config/urls';
|
||||
import { usePageLoading } from '@/hooks';
|
||||
import StoreProvider from '@/stores/Provider';
|
||||
import getColors from '@/styles/colors';
|
||||
@ -37,7 +38,7 @@ function App({ Component, pageProps }) {
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker
|
||||
.register('/service-worker.js')
|
||||
.register(withBasePath('/service-worker.js'))
|
||||
.then((registration) => {
|
||||
console.log('Service Worker registered:', registration);
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user