-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
57 lines (55 loc) · 1.79 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
import { defineConfig } from "vite";
import { sveltekit } from "@sveltejs/kit/vite";
import { SvelteKitPWA } from "@vite-pwa/sveltekit";
export default defineConfig({
plugins: [
sveltekit(),
SvelteKitPWA({
registerType: "autoUpdate",
includeAssets: [
"favicon.ico",
"logo.png"
],
workbox: {
globIgnores: [
"**/images/*.{png,jpg,jpeg,webp,gif}"
],
globPatterns: [
"client/**/*.{js,css,ico,png}"
],
runtimeCaching: [
{
urlPattern: /\.(?:png|jpg|jpeg|webp|gif)$/i,
handler: "CacheFirst",
options: {
cacheName: "images-cache",
expiration: {
maxEntries: 1000,
maxAgeSeconds: 604_800
}
}
}
]
},
manifest: {
name: "中国大面值邮票图鉴",
short_name: "大面值邮票",
description: "收录 2002年9月7日 之后发行的面值大于等于 2元 的邮票,不包含小型张",
background_color: "#f2f2f2",
theme_color: "#d6204b",
display: "standalone",
orientation: "landscape-primary",
icons: [
{
src: "logo.png",
sizes: "128x128",
type: "image/png"
}
]
}
})
],
server: {
host: "0.0.0.0"
}
});