-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
32 lines (30 loc) · 1.04 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
/// <reference types="vitest" />
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import svgr from "vite-plugin-svgr";
import path from "path";
import * as url from "url";
const dirName = url.fileURLToPath(new URL(".", import.meta.url));
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), svgr()],
test: {
globals: true,
environment: "jsdom",
setupFiles: "./test-setup.ts",
},
resolve: {
alias: {
"@/assets": path.resolve(dirName, "src/assets/"),
"@/components": path.resolve(dirName, "src/components/"),
"@/constants": path.resolve(dirName, "src/constants/"),
"@/hooks": path.resolve(dirName, "src/hooks/"),
"@/pages": path.resolve(dirName, "src/pages/"),
"@/services": path.resolve(dirName, "src/services/"),
"@/specs": path.resolve(dirName, "src/specs/"),
"@/stores": path.resolve(dirName, "src/stores/"),
"@/types": path.resolve(dirName, "src/types/"),
"@/utils": path.resolve(dirName, "src/utils/"),
},
},
});