Skip to content

Commit 0a7565c

Browse files
committed
fixed the vite base config
1 parent 3c70282 commit 0a7565c

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/main.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,4 @@ Promise.all([import('@/Root'), import('@/App')]).then(([{ default: render }, { d
1010
render(App);
1111
});
1212

13-
// Register the service worker
14-
if ('serviceWorker' in navigator) {
15-
window.addEventListener('load', () => {
16-
navigator.serviceWorker.register('/registerSW.js')
17-
.then(registration => {
18-
console.log('ServiceWorker registration successful with scope: ', registration.scope);
19-
})
20-
.catch(error => {
21-
console.log('ServiceWorker registration failed: ', error);
22-
});
23-
});
24-
}
25-
2613
export {};

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { defineConfig } from 'vite';
44
import { VitePWA } from 'vite-plugin-pwa';
55
import manifest from './manifest.json';
66

7-
const VITE_BASE_PATH = '';
7+
const VITE_BASE_PATH = './';
88
// https://vitejs.dev/config/
99
export default defineConfig({
1010
base: VITE_BASE_PATH, // Set the base path to your repo name

0 commit comments

Comments
 (0)