mirror of
https://github.com/lobehub/lobe-chat.git
synced 2025-12-20 01:12:52 +08:00
⚡️ perf: refactor pwa implement to have better performance (#4124)
* test remove serwist * 尝试优化 pwa install 实现 * Update next.config.mjs * fix lint * delay the service worker register * only enabled on prod * when isShowPWAGuide update, trigger guide too
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"lib": ["dom", "dom.iterable", "esnext", "webworker"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
@@ -16,7 +16,7 @@
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"baseUrl": ".",
|
||||
"types": ["vitest/globals"],
|
||||
"types": ["vitest/globals", "@serwist/next/typings"],
|
||||
"paths": {
|
||||
"@/*": ["./src/*"],
|
||||
"~test-utils": ["./tests/utils.tsx"]
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"exclude": ["node_modules"],
|
||||
"exclude": ["node_modules", "public/sw.js"],
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"vitest.config.ts",
|
||||
|
||||
Reference in New Issue
Block a user