iris-messenger/vite.config.ts

59 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-06-19 14:16:35 +00:00
import preact from '@preact/preset-vite';
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
2023-06-09 10:59:21 +00:00
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
preact(),
VitePWA({
2023-06-19 14:16:35 +00:00
registerType: 'autoUpdate',
2023-06-09 10:59:21 +00:00
devOptions: {
2023-06-19 14:16:35 +00:00
// enabled: true,
2023-06-09 10:59:21 +00:00
},
manifest: {
2023-06-19 14:16:35 +00:00
name: 'Iris',
short_name: 'Iris',
2023-06-09 10:59:21 +00:00
icons: [
{
2023-06-19 14:16:35 +00:00
src: '/img/android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png',
2023-06-09 10:59:21 +00:00
},
{
2023-06-19 14:16:35 +00:00
src: '/img/android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any',
2023-06-09 10:59:21 +00:00
},
{
2023-06-19 14:16:35 +00:00
src: '/img/maskable_icon.png',
sizes: '640x640',
type: 'image/png',
purpose: 'maskable',
2023-06-09 10:59:21 +00:00
},
{
2023-06-19 14:16:35 +00:00
src: '/img/maskable_icon_x192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'maskable',
2023-06-09 10:59:21 +00:00
},
],
2023-06-19 14:16:35 +00:00
theme_color: '#000000',
background_color: '#000000',
display: 'standalone',
2023-06-09 10:59:21 +00:00
},
}),
],
2023-08-09 14:54:36 +00:00
resolve: {
alias: {
'@': '/src/js',
},
},
2023-06-09 10:59:21 +00:00
/* preact/compat paths */
alias: {
2023-06-19 14:16:35 +00:00
react: 'preact/compat',
'react-dom': 'preact/compat',
2023-06-09 10:59:21 +00:00
},
});