Update sw.js configuration
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Alessio Davoli 2023-07-19 15:39:01 +02:00
parent b9a2ee18ca
commit 203d503ef1
7 changed files with 30 additions and 15 deletions

View file

@ -20,7 +20,6 @@
"eslint": "^8.45.0", "eslint": "^8.45.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0", "eslint-plugin-svelte": "^2.30.0",
"kolorist": "^1.8.0",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"prettier-plugin-svelte": "^3.0.0", "prettier-plugin-svelte": "^3.0.0",
"svelte": "^4.0.0", "svelte": "^4.0.0",

View file

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
export let title: string = 'Naturalistici'; export const title: string = 'Naturalistici';
const goBack = () => { const goBack = () => {
history.back(); history.back();

View file

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
export let title: string = 'Naturalistici'; export const title: string = 'Naturalistici';
const goBack = () => { const goBack = () => {
history.back(); history.back();

View file

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

View file

@ -3,12 +3,12 @@ import { vitePreprocess } from '@sveltejs/kit/vite';
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(), preprocess: vitePreprocess(),
kit: { kit: {
adapter: adapter({ adapter: adapter({
precompress: false, fallback: null,
precompress: true,
strict: true
}), }),
}, },
}; };

View file

@ -7,7 +7,28 @@ const config = {
sveltekit(), sveltekit(),
SvelteKitPWA({ SvelteKitPWA({
registerType: 'autoUpdate', registerType: 'autoUpdate',
strategies: 'generateSW' strategies: 'generateSW',
manifest: {
start_url: '/',
background_color: "#213c8b",
theme_color: "#de0e1b",
name: "PianelloExperience",
display: "fullscreen",
short_name: "PianelloExperience",
description: "Pianello Experience",
icons: [
{
src: "/images/app-icon-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "/images/app-icon-192x192.png",
sizes: "192x192",
type: "image/png",
},
],
},
}) })
], ],
test: { test: {

View file

@ -2741,11 +2741,6 @@ known-css-properties@^0.27.0:
resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.27.0.tgz#82a9358dda5fe7f7bd12b5e7142c0a205393c0c5" resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.27.0.tgz#82a9358dda5fe7f7bd12b5e7142c0a205393c0c5"
integrity sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg== integrity sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==
kolorist@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c"
integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==
leaflet@^1.9.4: leaflet@^1.9.4:
version "1.9.4" version "1.9.4"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.9.4.tgz#23fae724e282fa25745aff82ca4d394748db7d8d" resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.9.4.tgz#23fae724e282fa25745aff82ca4d394748db7d8d"