-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
75 lines (74 loc) · 1.75 KB
/
vite.config.ts
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
72
73
74
75
import {fileURLToPath, URL} from 'node:url';
import {defineConfig} from 'vite';
import {VitePWA} from 'vite-plugin-pwa';
import vue from '@vitejs/plugin-vue';
// https://vitejs.dev/config/
export default defineConfig({
define: {
__VITE_BUILD_TIME__: JSON.stringify(new Date().toISOString()),
},
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
name: 'Eat Your Veggies',
short_name: 'Eat Your Veggies',
description: 'Embrace a healthier lifestyle by eating at least 30 veggies each week.',
orientation: 'portrait',
dir: 'ltr',
icons: [
{
src: 'pwa-192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any',
},
{
src: 'pwa-192-maskable.png',
sizes: '192x192',
type: 'image/png',
purpose: 'maskable',
},
{
src: 'pwa-512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any',
},
{
src: 'pwa-512-maskable.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
],
theme_color: '#0ea5e9',
background_color: '#0ea5e9',
categories: ['food', 'health', 'lifestyle'],
},
workbox: {
globPatterns: ['**/*.{js,css,html,png}'],
},
devOptions: {
enabled: false,
},
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
preview: {
port: 5173,
},
base: '/veggies',
});