PWA: manifest i service worker

This commit is contained in:
2026-02-08 17:19:04 +01:00
parent 86e7a02a5c
commit 28eb9ad391
5 changed files with 4996 additions and 4 deletions

View File

@@ -1,12 +1,44 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
import path from 'path'
export default defineConfig({
plugins: [vue()],
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
injectRegister: 'auto',
devOptions: {
enabled: true
},
manifest: {
name: 'Nonograms',
short_name: 'Nonograms',
description: 'Nonograms',
start_url: '/',
scope: '/',
display: 'standalone',
background_color: '#191654',
theme_color: '#00f2fe',
icons: [
{
src: '/pwa-192x192.svg',
sizes: '192x192',
type: 'image/svg+xml'
},
{
src: '/pwa-512x512.svg',
sizes: '512x512',
type: 'image/svg+xml'
}
]
}
})
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
}
})
})