Add vite-plugin-pwa
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
Alessio Davoli 2023-07-18 18:34:53 +02:00
parent 825a2e2f6a
commit c82189af72
3 changed files with 2238 additions and 13 deletions

View file

@ -26,7 +26,8 @@
"svelte-check": "^3.4.6", "svelte-check": "^3.4.6",
"tslib": "^2.4.1", "tslib": "^2.4.1",
"typescript": "^5.0.0", "typescript": "^5.0.0",
"vite": "^4.4.4" "vite": "^4.4.4",
"vite-plugin-pwa": "^0.16.4"
}, },
"type": "module", "type": "module",
"dependencies": { "dependencies": {

View file

@ -1,9 +1,15 @@
import { sveltekit } from "@sveltejs/kit/vite"; import { sveltekit } from "@sveltejs/kit/vite";
import adapter from "@sveltejs/adapter-node"; import adapter from "@sveltejs/adapter-node";
import { SvelteKitPWA } from '@vite-pwa/sveltekit'
const config = { const config = {
plugins: [ plugins: [
sveltekit(), sveltekit(),
SvelteKitPWA({
strategies: 'injectManifest',
srcDir: 'src',
filename: 'sw.ts',
})
], ],
test: { test: {
include: ["src/**/*.{test,spec}.{js,ts}"], include: ["src/**/*.{test,spec}.{js,ts}"],

File diff suppressed because it is too large Load diff