Skip to content

Commit 67b5039

Browse files
committed
Fixed PWA caching mechanism
1 parent 09d8e64 commit 67b5039

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

public/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"theme_color": "#000000",
99
"icons": [
1010
{
11-
"src": "./src/assets/images/TeXlyre_notext.png",
11+
"src": "./texlyre-icon-192.png",
1212
"sizes": "192x192",
1313
"type": "image/png",
1414
"purpose": "any maskable"

sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const CACHE_NAME = `texlyre-v${process.env.npm_package_version || '1'}`;
1+
const CACHE_NAME = 'texlyre-v1';
22
const BASE_PATH = '/texlyre/';
33

44
console.log('[SW] Service Worker loading with base path:', BASE_PATH);

vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const useHttps = process.env.VITE_USE_HTTPS === "true";
1111
export default defineConfig({
1212
base: "/texlyre/",
1313

14+
define: {
15+
'process.env.npm_package_version': JSON.stringify(process.env.npm_package_version || '1.0.0')
16+
},
17+
1418
build: {
1519
target: "esnext",
1620
commonjsOptions: {

0 commit comments

Comments
 (0)