54 lines
1.3 KiB
JavaScript
54 lines
1.3 KiB
JavaScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg}']
|
|
},
|
|
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'calendar-icon.svg'],
|
|
manifest: {
|
|
name: 'OpenWall Calendar',
|
|
short_name: 'Calendar',
|
|
description: 'Mobile calendar app for OpenWall Smart Home Dashboard',
|
|
theme_color: '#3b82f6',
|
|
background_color: '#f8f9fa',
|
|
display: 'standalone',
|
|
scope: '/',
|
|
start_url: '/',
|
|
icons: [
|
|
{
|
|
src: 'pwa-192x192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'pwa-512x512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'pwa-512x512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'any maskable'
|
|
}
|
|
]
|
|
}
|
|
})
|
|
],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3001',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
})
|