-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
71 lines (70 loc) · 1.64 KB
/
vite.config.js
File metadata and controls
71 lines (70 loc) · 1.64 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
69
70
71
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { VitePWA } from "vite-plugin-pwa";
export default defineConfig((env) => ({
base: "/",
plugins: [
react(),
VitePWA({
devOptions: {
enabled: process.env.NODE_ENV === "development",
type: "module",
},
registerType: "autoUpdate",
injectRegister: null,
strategies: "injectManifest",
srcDir: "src",
filename: "service-worker.js",
manifest: {
short_name: "RADFish",
name: "RADFish React Boilerplate",
icons: [
{
src: "icons/144.png",
type: "image/png",
sizes: "144x144",
purpose: "any",
},
{
src: "icons/144.png",
type: "image/png",
sizes: "144x144",
purpose: "maskable",
},
{
src: "icons/192.png",
type: "image/png",
sizes: "192x192",
purpose: "maskable",
},
{
src: "icons/512.png",
type: "image/png",
sizes: "512x512",
purpose: "maskable",
},
],
start_url: ".",
display: "standalone",
theme_color: "#000000",
background_color: "#ffffff",
},
}),
],
server: {
open: true,
port: 3000,
proxy: {
"/api": {
target: "http://localhost:3002",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
test: {
globals: true,
setupFiles: "./src/__tests__/setup.js",
environment: "jsdom",
},
}));