-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
46 lines (45 loc) · 999 Bytes
/
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
import UnoCSS from 'unocss/vite'
import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
UnoCSS({
injectReset: true,
}),
VitePWA({
registerType: 'autoUpdate',
workbox: {
runtimeCaching: [
{
urlPattern: /^https:\/\/rsms\.me\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'inter-fonts-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365 // <== 365 days
},
cacheableResponse: {
statuses: [0, 200]
}
}
},
{
urlPattern: /^https:\/\/static\.wikia\.nocookie\.net\/\/warframe\/images\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'wikia-images-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365 // <== 365 days
},
cacheableResponse: {
statuses: [0, 200]
}
}
},
],
}
})
],
})