@@ -8,14 +8,11 @@ import { VitePWA } from 'vite-plugin-pwa';
88import { resolve } from 'node:path' ;
99import { statSync } from 'node:fs' ;
1010
11- const base = process . env . GITHUB_PAGES == 'true' ? '/web-client/' : '/' ;
12-
1311const wasmPath = resolve ( __dirname , 'src/assets/core.wasm' ) ;
1412const wasmDecodedSize = statSync ( wasmPath ) . size ;
1513
1614// https://vite.dev/config/
1715export default defineConfig ( {
18- base,
1916 plugins : [
2017 vue ( ) ,
2118 // compress wasm files to brotli, zstd and gzip
@@ -40,22 +37,22 @@ export default defineConfig({
4037 manifest : {
4138 name : 'Git Calendar Web' ,
4239 short_name : 'Git Cal' ,
43- id : base ,
44- start_url : base ,
45- scope : base ,
40+ id : '/' ,
41+ start_url : '/' ,
42+ scope : '/' ,
4643 description : 'A web client for a Git-backed calendar.' ,
4744 display : 'standalone' ,
4845 background_color : '#ffffff' ,
4946 theme_color : '#ffffff' ,
5047 orientation : 'portrait-primary' ,
5148 icons : [
5249 {
53- src : ` ${ base } icon-192.png` ,
50+ src : '/ icon-192.png' ,
5451 sizes : '192x192' ,
5552 type : 'image/png' ,
5653 } ,
5754 {
58- src : ` ${ base } icon-512.png` ,
55+ src : '/ icon-512.png' ,
5956 sizes : '512x512' ,
6057 type : 'image/png' ,
6158 } ,
@@ -68,7 +65,7 @@ export default defineConfig({
6865 globPatterns : [ '**/*.{js,css,html,ico,png,svg,webp,woff2,wasm,zst,br,gz}' ] ,
6966 maximumFileSizeToCacheInBytes : 25 * 1024 * 1024 , // 25MiB (core.wasm is a big boy)
7067 cleanupOutdatedCaches : true ,
71- navigateFallback : ` ${ base } index.html` ,
68+ navigateFallback : '/ index.html' ,
7269 } ,
7370 } ) ,
7471 ] ,
0 commit comments