-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.js
51 lines (50 loc) · 1.34 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
import { defineConfig } from "vite";
import reactRefresh from "@vitejs/plugin-react-refresh";
import { viteMockServe } from "vite-plugin-mock";
import { VitePWA } from "vite-plugin-pwa";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: [{ find: "@", replacement: path.resolve(__dirname, "src") }],
},
plugins: [
reactRefresh(),
// VitePWA({
// mode: "development",
// strategies: "injectManifest",
// registerType: "autoUpdate",
// srcDir: "src",
// filename: "service-worker.ts",
// devOptions: {
// enabled: true,
// type: "module",
// },
// injectManifest: {
// injectionPoint: undefined,
// },
// }),
// viteMockServe({
// mockPath: "mock",
// supportTs: true,
// }),
],
css: {
modules: {
localsConvention: "camelCaseOnly",
},
},
server: {
proxy: {
"/api": {
target: "https://ribbon.anni.rs/api",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
port: 3000,
},
build: {
sourcemap: true,
},
});