-
Notifications
You must be signed in to change notification settings - Fork 17
/
vite.config.js
71 lines (69 loc) · 1.86 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
const manifest = {
name: 'Bar Assistant',
short_name: 'Bar Assistant',
description: 'Bar assistant is a self hosted application for managing your home bar.',
orientation: "portrait",
icons: [
{
"src": 'icons/pwa256.png',
"sizes": '256x256',
"type": 'image/png',
"purpose": "any",
},
{
"src": 'icons/pwa512.png',
"sizes": '512x512',
"type": 'image/png',
"purpose": "any",
},
{
"purpose": "maskable",
"sizes": "858x858",
"src": "icons/maskable_icon.png",
"type": "image/png"
},
{
"purpose": "maskable",
"sizes": "48x48",
"src": "icons/maskable_icon_x48.png",
"type": "image/png"
},
{
"purpose": "maskable",
"sizes": "128x128",
"src": "icons/maskable_icon_x128.png",
"type": "image/png"
},
{
"purpose": "maskable",
"sizes": "512x512",
"src": "icons/maskable_icon_x512.png",
"type": "image/png"
}
]
};
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue({
template: {
compilerOptions: {
isCustomElement: (tag) => ['swiper-container', 'swiper-slide'].includes(tag),
}
}
}), VitePWA({
workbox: {
navigateFallbackDenylist: [/^\/bar/]
},
manifest: manifest,
registerType: 'autoUpdate',
})],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})