-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
37 lines (36 loc) · 984 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
37 lines (36 loc) · 984 Bytes
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
import { resolve } from "node:path";
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [
react({
babel: {
plugins: [
["@babel/plugin-proposal-decorators", { version: "2023-11" }],
],
},
}),
],
resolve: {
dedupe: ["react", "react-dom"],
alias: {
"march-hare": resolve(__dirname, "src/library/index.ts"),
"@example/app": resolve(__dirname, "src/example/app"),
"@example/features": resolve(__dirname, "src/example/features"),
"@example/shared": resolve(__dirname, "src/example/shared"),
},
},
test: {
environment: "happy-dom",
include: ["src/**/*.test.{ts,tsx}", "src/**/*.integration.{ts,tsx}"],
exclude: ["tests/**/*"],
setupFiles: ["./src/test-setup.ts"],
clearMocks: true,
restoreMocks: true,
server: {
deps: {
inline: ["lodash", "immertation"],
},
},
},
});