2022-11-10 11:00:40 +00:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import preact from '@preact/preset-vite';
|
|
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2022-11-10 14:58:38 +00:00
|
|
|
plugins: [
|
|
|
|
preact(),
|
|
|
|
VitePWA({
|
|
|
|
registerType: 'autoUpdate',
|
|
|
|
includeAssets: ['favicon.png', 'apple-touch-icon.png'],
|
|
|
|
manifest: {
|
|
|
|
name: 'SecSan',
|
|
|
|
short_name: 'SecSan',
|
|
|
|
description: 'Secret santa name drawing',
|
|
|
|
theme_color: '#ffffff',
|
|
|
|
icons: [
|
|
|
|
{
|
|
|
|
src: 'favicon.png',
|
|
|
|
sizes: '256x256',
|
|
|
|
type: 'image/png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: 'favicon-192.png',
|
|
|
|
sizes: '192x192',
|
|
|
|
type: 'image/png',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
server: {
|
|
|
|
hmr: {
|
|
|
|
clientPort: parseInt(process.env.CLIENT_PORT || '5173', 10),
|
|
|
|
},
|
2022-11-10 11:00:40 +00:00
|
|
|
},
|
|
|
|
});
|