Files
miniplan/public/vite.config.ts
T
walamana 0350b80cda
Deploy Miniplan / build (push) Failing after 1m20s
feat: make miniplan a PWA
2026-07-21 13:41:18 +02:00

80 lines
1.9 KiB
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'minis_logo.png'],
manifest: {
name: 'Miniplan',
short_name: 'Miniplan',
description: 'Miniplan',
theme_color: '#ffffff',
background_color: '#ffffff',
display: 'standalone',
scope: '/',
start_url: '/',
screenshots: [
{
src: 'screenshot1.png',
sizes: '505x710',
type: 'image/png',
form_factor: "narrow",
label: "Miniplan Liste"
},
{
src: 'screenshot2.png',
sizes: '505x711',
type: 'image/png',
form_factor: "narrow",
label: "Miniplan Tabelle"
},
{
src: "screenshot3.png",
sizes: '1003x709',
type: 'image/png',
form_factor: "wide",
label: "Miniplan Tabelle"
}
],
icons: [
{
src: "pwa-64x64.png",
sizes: "64x64",
type: "image/png"
},
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png"
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png"
},
{
src: "maskable-icon-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable"
}
]
},
devOptions: {
enabled: true
}
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})