-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvite.config.js
86 lines (85 loc) · 2.46 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
import react from "@vitejs/plugin-react";
import { fileURLToPath, URL } from "url";
import { VitePWA } from "vite-plugin-pwa";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
VitePWA({
manifest: {
name: "Genius Lyrics Card Maker",
short_name: "Lyrics Cards",
lang: "en-US",
description:
"Search for any song and create a personalized Genius lyrics cards to share with your friends.",
icons: [
{
src: "/manifest-icon-192.maskable.png",
sizes: "192x192",
type: "image/png",
purpose: "any",
},
{
src: "/manifest-icon-192.maskable.png",
sizes: "192x192",
type: "image/png",
purpose: "maskable",
},
{
src: "/manifest-icon-512.maskable.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "/manifest-icon-512.maskable.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
theme_color: "#f7f16c",
background_color: "#272838",
display: "standalone",
scope: "/",
start_url: "/",
orientation: "portrait",
},
workbox: {
skipWaiting: true,
},
}),
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
"@utils": fileURLToPath(new URL("./src/utils", import.meta.url)),
"@assets": fileURLToPath(new URL("./src/assets", import.meta.url)),
"@components": fileURLToPath(
new URL("./src/components", import.meta.url)
),
"@contexts": fileURLToPath(new URL("./src/contexts", import.meta.url)),
"@hooks": fileURLToPath(new URL("./src/hooks", import.meta.url)),
"@controls": fileURLToPath(
new URL("./src/components/controls", import.meta.url)
),
"@skeletons": fileURLToPath(
new URL("./src/components/utils/skeletons", import.meta.url)
),
"@compUtils": fileURLToPath(
new URL("./src/components/utils", import.meta.url)
),
},
},
server: {
proxy: {
"/api": {
target: "https://genius-unofficial-api.vercel.app/api",
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
});