Update SvelteKitPWA config
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Alessio Davoli 2023-07-19 15:02:38 +02:00
parent 69ec57cb0d
commit dd4b3b5373
8 changed files with 5 additions and 16 deletions

BIN
frontend/splash.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View file

@ -12,7 +12,7 @@
</script> </script>
{#if visible} {#if visible}
<img transition:fade src="/splash.jpeg" alt="splash" /> <img transition:fade src="/splash.webp" alt="splash" />
{/if} {/if}
<style> <style>

View file

@ -24,7 +24,7 @@
<Header></Header> <Header></Header>
<img src='/splash.jpeg' alt='splash'> <img src='/splash.webp' alt='splash'>
<div bind:this={divider} id='divider'> <div bind:this={divider} id='divider'>
<div id='banner'> <div id='banner'>
@ -70,4 +70,4 @@
font-size: 14px; font-size: 14px;
text-align: rightìì; text-align: rightìì;
} }
</style> </style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View file

@ -7,12 +7,6 @@ const config = {
// for more information about preprocessors // for more information about preprocessors
preprocess: vitePreprocess(), preprocess: vitePreprocess(),
kit: { kit: {
files: {
serviceWorker: 'src/sw.ts',
},
serviceWorker: {
register: false
},
adapter: adapter({ adapter: adapter({
precompress: false, precompress: false,
}), }),

View file

@ -5,12 +5,7 @@ import { SvelteKitPWA } from '@vite-pwa/sveltekit'
const config = { const config = {
plugins: [ plugins: [
sveltekit(), sveltekit(),
SvelteKitPWA({ SvelteKitPWA()
registerType: 'autoUpdate',
strategies: 'injectManifest',
srcDir: 'src',
filename: 'sw.ts',
})
], ],
test: { test: {
include: ["src/**/*.{test,spec}.{js,ts}"], include: ["src/**/*.{test,spec}.{js,ts}"],
@ -26,4 +21,4 @@ const config = {
}, },
}; };
export default config; export default config;