-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
68 lines (66 loc) · 1.92 KB
/
Copy pathvite.config.ts
File metadata and controls
68 lines (66 loc) · 1.92 KB
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
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react"
import { VitePWA } from "vite-plugin-pwa"
import { resolve } from "path"
import { readFileSync } from "fs"
const packageJson = JSON.parse(
readFileSync(resolve(__dirname, "package.json"), "utf-8"),
)
export default defineConfig({
define: {
"import.meta.env.VERCEL_GIT_COMMIT_SHA": JSON.stringify(
process.env.VERCEL_GIT_COMMIT_SHA || "dev",
),
"import.meta.env.PACKAGE_VERSION": JSON.stringify(packageJson.version),
},
resolve: {
alias: {
"@": resolve(__dirname, "src"),
},
},
server: {
proxy: {
"/api": "http://localhost:3000",
},
},
css: {
preprocessorOptions: {
scss: {
loadPaths: ["src"],
},
},
},
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
manifest: {
name: "ai*jot",
short_name: "aijot",
description: "A minimalist keyboard-first note app",
start_url: "/jot",
display: "standalone",
background_color: "#1a1a1a",
theme_color: "#1a1a1a",
icons: [
{
src: "maskable-icon-128x128.png",
sizes: "128x128",
type: "image/png",
},
{
src: "maskable-icon-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "maskable-icon-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
}),
],
})