-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
vite.config.ts
111 lines (110 loc) · 2.87 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import { fileURLToPath, URL } from 'url';
import { defineConfig, splitVendorChunkPlugin } from 'vite';
import react from '@vitejs/plugin-react';
import { imagetools } from 'vite-imagetools';
import { VitePWA } from 'vite-plugin-pwa';
import wyw from '@wyw-in-js/vite';
// https://vitejs.dev/config/
export default defineConfig({
json: {
stringify: true,
},
resolve: {
alias: [
{
find: '@',
replacement: fileURLToPath(new URL('./src', import.meta.url)),
},
],
},
plugins: [
splitVendorChunkPlugin(),
react(),
wyw({
include: ['**/*.{ts,tsx}'],
}),
imagetools({
exclude: ['./src/assets/mvp_icons_animated/**/*'],
defaultDirectives: (url) => {
return new URLSearchParams({
format: 'webp',
lossless: 'false',
});
},
}),
VitePWA({
injectRegister: false,
registerType: 'autoUpdate',
devOptions: {
enabled: process.env.NODE_ENV === 'development',
},
manifest: {
short_name: 'MVP Timer',
name: 'Ragnarok MVP Timer',
lang: 'en',
description: 'app to track ragnarok mvp respawn',
display: 'standalone',
theme_color: '#f89200',
background_color: '#F6F8FA',
related_applications: [
{
platform: 'web',
url: 'https://ragnarok-mvp-timer.com',
},
],
icons: [
{
src: '/icons/favicon-16x16.png',
sizes: '16x16',
type: 'image/png',
},
{
src: '/icons/favicon-32x32.png',
sizes: '32x32',
type: 'image/png',
},
{
src: '/icons/android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/icons/android-chrome-256x256.png',
sizes: '256x256',
type: 'image/png',
},
],
screenshots: [
{
src: '/screenshots/site-screenshot.webp',
sizes: '1903x1079',
type: 'image/webp',
form_factor: 'wide',
label: 'Main page',
},
{
src: '/screenshots/desktop-servers-screenshot.webp',
sizes: '1903x1079',
type: 'image/webp',
form_factor: 'wide',
label: 'Server selection',
},
{
src: '/screenshots/mobile-screenshot.webp',
sizes: '320x736',
type: 'image/webp',
form_factor: 'narrow',
label: 'Main page on mobile',
},
{
src: '/screenshots/mobile-servers-screenshot.webp',
sizes: '320x736',
type: 'image/webp',
form_factor: 'narrow',
label: 'Server selection on mobile',
},
],
},
}),
],
});