-
Notifications
You must be signed in to change notification settings - Fork 20
/
vite.config.mts
49 lines (47 loc) · 1.05 KB
/
vite.config.mts
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
import UnpluginTypia from "@ryoppippi/unplugin-typia/vite";
import react from "@vitejs/plugin-react-swc";
import checker from "vite-plugin-checker";
import svgr from "vite-plugin-svgr";
import { defineConfig } from "vitest/config";
// export BASE_PATH to reuse it in e2e test
export const BASE_URL = process.env.BASE_URL || "/gephi-lite/";
export default defineConfig({
base: BASE_URL,
plugins: [
UnpluginTypia({}),
react(),
svgr(),
checker({
typescript: {
buildMode: true,
},
eslint: {
lintCommand: "eslint --ext .ts,.tsx,.js,.jsx src --max-warnings=0",
},
}),
],
resolve: {
alias: {
global: "window",
"node-fetch": "isomorphic-fetch",
},
},
test: {
root: ".",
globals: true,
exclude: ["e2e", "node_modules"],
},
build: {
outDir: "build",
},
server: {
open: false,
proxy: {
"^/_github/*": {
target: "https://github.com",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/_github/, ""),
},
},
},
});