Add configurations for service worker
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Alessio Davoli 2023-07-18 18:30:12 +02:00
parent e50ff329c3
commit 825a2e2f6a
2 changed files with 4 additions and 8 deletions

View file

@ -1,7 +1,7 @@
<script>
import { pwaInfo } from 'virtual:pwa-info';
// import { pwaInfo } from 'virtual:pwa-info';
import BottomAppBar from '$lib/components/BottomAppBar.svelte';
$: webManifestLink = pwaInfo ? pwaInfo.webManifest.linkTag : ''
// $: webManifestLink = pwaInfo ? pwaInfo.webManifest.linkTag : ''
</script>
<slot></slot>
@ -9,9 +9,11 @@
<BottomAppBar />
</footer>
<!--
<svelte:head>
{@html webManifestLink}
</svelte:head>
-->
<style>
footer {

View file

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