Closed amirhhashemi closed 2 years ago
I just installed the package with pnpm, followed the docs, added the auto update script and I get this error:
dependencies:
"@vite-pwa/sveltekit": "^0.0.1", "vite": "^3.2.2", "vite-plugin-pwa": "^0.13.1" "@sveltejs/kit": "next",
vite.config.ts:
import type { UserConfig } from "vite"; import { sveltekit } from "@sveltejs/kit/vite"; import { SvelteKitPWA } from "@vite-pwa/sveltekit"; const config: UserConfig = { plugins: [ sveltekit(), SvelteKitPWA({ devOptions: { enabled: true, }, manifest: { scope: "/", name: "...", short_name: "...", description: "...", theme_color: "#ffffff", icons: [ { src: "/icons/android-chrome-192x192.png", sizes: "192x192", type: "image/png", }, { src: "/icons/android-chrome-512x512.png", sizes: "512x512", type: "image/png", }, { src: "/icons/android-chrome-512x512.png", sizes: "512x512", type: "image/png", purpose: "any maskable", }, ], }, }), ], };
Node version: v16.18.1 Browser: Chromium and Firefox
I found a similar issue in the main repo: https://github.com/vite-pwa/vite-plugin-pwa/issues/227. Installing workbox-window as a dev dependency solved the problem: pnpm i -D workbox-window.
workbox-window
pnpm i -D workbox-window
I just installed the package with pnpm, followed the docs, added the auto update script and I get this error:
dependencies:
vite.config.ts:
Node version: v16.18.1 Browser: Chromium and Firefox