48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import react from '@vitejs/plugin-react'
|
|
import { defineConfig } from 'vite'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
strategies: 'injectManifest',
|
|
srcDir: 'src',
|
|
filename: 'sw.ts',
|
|
injectRegister: 'auto',
|
|
manifest: {
|
|
name: 'Notizarr',
|
|
short_name: 'Notizarr',
|
|
description: 'Self-hosted notification hub',
|
|
start_url: '/?source=pwa',
|
|
scope: '/',
|
|
display: 'standalone',
|
|
background_color: '#0a0b0e',
|
|
theme_color: '#0a0b0e',
|
|
orientation: 'portrait',
|
|
categories: ['utilities'],
|
|
icons: [
|
|
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
|
|
{
|
|
src: '/icons/maskable-512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'maskable',
|
|
},
|
|
],
|
|
},
|
|
injectManifest: {
|
|
globPatterns: ['**/*.{js,css,html,svg,png}'],
|
|
},
|
|
devOptions: {
|
|
enabled: false,
|
|
},
|
|
}),
|
|
],
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
},
|
|
})
|