-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathvite.config.js
92 lines (90 loc) · 3.13 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import { VitePWA } from 'vite-plugin-pwa'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import viteCompression from 'vite-plugin-compression';
const config = () => {
return defineConfig({
base: '/',
server: {
open: true,
port: 3000,
host: true,
watch: {
usePolling: true
}
},
build: {
outDir: "build",
emptyOutDir: true
},
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
"short_name": "NTS-web",
"name": "NTS-1 web controller",
"description": "An NTS-1 web controller, editor and sequencer",
"screenshots": [
{
"src": "static/media/feature.png",
"type": "image/png",
"sizes": "1024x500",
"form_factor": "wide"
}
],
"categories": ["Music", "Midi", "Synthesizer"],
"dir": "ltr",
"lang": "en",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64",
"type": "image/x-icon"
},
{
"src": "static/media/icons/icon192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "static/media/icons/icon512.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "static/media/icons/icon.png",
"type": "image/png",
"sizes": "1024x1024",
"purpose": "maskable"
}
],
"scope": "/",
"start_url": ".",
"display": "standalone",
"theme_color": "#f3cc62",
"background_color": "#212122",
"orientation": "any",
"related_applications": [
{
"platform": "web",
"url": "https://nts-web.oscarrc.me"
},
{
"platform": "play",
"url": "https://play.google.com/store/apps/details?id=me.oscarrc.nts_web.twa",
"id": "me.oscarrc.nts_web.twa"
}
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,json}'],
maximumFileSizeToCacheInBytes: 3000000,
runtimeCaching: []
}
}),
viteCompression()
]
})
}
export default config;