-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
93 lines (89 loc) · 1.99 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
import * as path from "path";
import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa";
import million from "million/compiler";
const PWA = VitePWA({
strategies: "injectManifest",
srcDir: "src",
filename: "sw.ts",
includeAssets: [
"favicon-196.png",
"robots.txt",
"apple-splash-dark-2048-2732.jpg",
"apple-splash-dark-1668-2388.jpg",
"apple-splash-dark-1536-2048.jpg",
"apple-splash-dark-1668-2224.jpg",
"apple-splash-dark-1620-2160.jpg",
"apple-splash-dark-1290-2796.jpg",
"apple-splash-dark-1179-2556.jpg",
"apple-splash-dark-1284-2778.jpg",
"apple-splash-dark-1170-2532.jpg",
"apple-splash-dark-1125-2436.jpg",
"apple-splash-dark-1242-2688.jpg",
"apple-splash-dark-828-1792.jpg",
"apple-splash-dark-1242-2208.jpg",
"apple-splash-dark-750-1334.jpg",
"apple-splash-dark-640-1136.jpg",
"apple-icon-180.png",
"wave3.png",
"bg.svg",
],
manifest: {
name: "Bucket",
short_name: "Bucket",
description: "words words",
theme_color: "#000000",
background_color: "#000000",
icons: [
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
purpose: "any",
},
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
purpose: "maskable",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
});
export default defineConfig({
css: {
postcss: "./postcss.config.js",
},
plugins: [
PWA,
million.vite({
auto: {
threshold: 0.05,
skip: ["useBadHook", /badVariable/g],
},
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
build: {
target: "safari11",
},
server: {
port: 4000,
},
});