feat: use sveltekit pwa
This commit is contained in:
1 parent
fd29a7d1f8
commit
1ee2918031
10 files changed
+2362
-131
No files matched your search
+31
-1
@@ -1,8 +1,38 @@
|
||||
import { sveltekit } from '@sveltejs/kit/vite'
|
||||
import { defineConfig, type PluginOption } from 'vite'
|
||||
import { SvelteKitPWA } from '@vite-pwa/sveltekit'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [sveltekit()],
|
||||
plugins: [
|
||||
sveltekit(),
|
||||
SvelteKitPWA({
|
||||
registerType: 'autoUpdate',
|
||||
strategies: 'generateSW',
|
||||
workbox: {
|
||||
globPatterns: ['client/**/*.{js,css,html,ico,png,svg}'],
|
||||
},
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
type: 'module',
|
||||
navigateFallback: '/',
|
||||
},
|
||||
manifest: {
|
||||
name: 'Photon for Lemmy',
|
||||
short_name: 'Photon',
|
||||
description: 'A lemmy client with a sleek design',
|
||||
theme_color: '#000000',
|
||||
display: 'standalone',
|
||||
icons: [
|
||||
{
|
||||
src: 'logo_512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
purpose: 'masked any',
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
define: {
|
||||
__VERSION__: JSON.stringify(process.env.npm_package_version),
|
||||
|
||||
Reference in new issue
Block a user