-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
76 lines (75 loc) · 2.19 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
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";
import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
devOptions: {
enabled: true,
},
workbox: {
globPatterns: [
"**/*.{js,css,html,png,svg,jpg,jpeg,woff,woff2,ttf,otf}",
],
},
manifest: {
name: "HostelHub",
short_name: "HostelHub",
description: "Tecno hostel management system",
theme_color: "#f2f2f2",
orientation: "portrait",
icons: [
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "maskable-icon-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
}),
],
test: {
globals: true,
environment: "jsdom",
setupFiles: "./setup.ts",
},
resolve: {
alias: {
"@src": path.resolve(__dirname, "./src"),
"@assets": path.resolve(__dirname, "./src/assets"),
"@components": path.resolve(__dirname, "./src/components"),
"@constant": path.resolve(__dirname, "./src/constant"),
"@context": path.resolve(__dirname, "./src/context"),
"@layout": path.resolve(__dirname, "./src/layout"),
"@routes": path.resolve(__dirname, "./src/routes"),
"@style": path.resolve(__dirname, "./src/style"),
"@pages": path.resolve(__dirname, "./src/pages"),
"@themes": path.resolve(__dirname, "/src/themes"),
"@types": path.resolve(__dirname, "/src/ts/types"),
"@test": path.resolve(__dirname, "./src/__test__"),
"@utils": path.resolve(__dirname, "./src/utils"),
"@ts": path.resolve(__dirname, "./src/ts"),
"@hooks": path.resolve(__dirname, "./src/hooks"),
},
},
});