fix(pwa): resolve workbox-window build error with Cloudflare plugin
Add workbox-window as direct dependency and set injectRegister: false to prevent conflict between vite-plugin-pwa and @cloudflare/vite-plugin. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d199e9e3a8
commit
c80a6fa94b
3 changed files with 5 additions and 0 deletions
|
|
@ -68,6 +68,7 @@
|
|||
"vite-plugin-pwa": "^1.2.0",
|
||||
"vite-tsconfig-paths": "^5.1.4",
|
||||
"vitest": "^3.2.4",
|
||||
"workbox-window": "^7.4.0",
|
||||
"wrangler": "^4.24.3"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export default defineConfig(({ mode }) => {
|
|||
plugins.push(
|
||||
VitePWA({
|
||||
registerType: "autoUpdate",
|
||||
injectRegister: false,
|
||||
includeAssets: [
|
||||
"public/icon.jpg",
|
||||
"public/logo_dark.png",
|
||||
|
|
|
|||
|
|
@ -501,6 +501,9 @@ importers:
|
|||
vitest:
|
||||
specifier: ^3.2.4
|
||||
version: 3.2.4(@types/debug@4.1.12)(@types/node@22.18.12)(happy-dom@20.0.7)(jiti@2.6.1)(jsdom@20.0.3)(lightningcss@1.30.2)(terser@5.46.1)(tsx@4.20.6)
|
||||
workbox-window:
|
||||
specifier: ^7.4.0
|
||||
version: 7.4.0
|
||||
wrangler:
|
||||
specifier: ^4.24.3
|
||||
version: 4.44.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue