-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
91 lines (90 loc) · 2.4 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
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react-swc";
import { VitePWA } from "vite-plugin-pwa";
// https://vitejs.dev/config/
export default defineConfig({
// https://github.com/vitejs/vite/issues/1973#issuecomment-787571499
define: {
"process.env": {},
},
build: {
outDir: "build", // dist by default
},
resolve: {
alias: {
"node-fetch": "isomorphic-fetch",
},
},
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
workbox: {
// Don't precache files more than 2 MB
globPatterns: ["**/*.{js,css,html,ico,jpg,png,svg,pdf,webp}"],
// Exclude routes belonging to other repos
navigateFallbackAllowlist: [/^\/$/, /^\/#\//],
},
manifest: {
short_name: "Abhishek Chaudhuri",
name: "Abhishek Chaudhuri - Portfolio Website",
description:
"Learn more about Abhishek Chaudhuri: Rutgers Alumnus & Software Engineer on his personal website. Check out his portfolio of projects ranging from web development, mobile development, game design, and machine learning.",
icons: [
{
src: "favicon.ico",
sizes: "48x48",
type: "image/x-icon",
},
{
src: "icon/android-chrome-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "icon/android-chrome-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
],
start_url: "/",
display: "minimal-ui",
theme_color: "#000000",
background_color: "#ffffff",
screenshots: [
{
src: "screenshots/screenshot-desktop.png",
sizes: "2360x1640",
type: "image/png",
form_factor: "wide",
label: "Home screen",
},
{
src: "screenshots/screenshot-mobile.png",
sizes: "1082x2402",
type: "image/png",
form_factor: "narrow",
label: "Home screen",
},
],
},
}),
],
test: {
globals: true,
environment: "jsdom",
setupFiles: "./src/utils/setupTests.ts",
coverage: {
provider: "v8",
all: false,
},
},
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler",
},
},
},
});