-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathvitest.config.js
More file actions
55 lines (53 loc) · 1.34 KB
/
vitest.config.js
File metadata and controls
55 lines (53 loc) · 1.34 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
import { defineConfig } from "vitest/config";
import path from "path";
import babel from "vite-plugin-babel";
import { viteStaticCopy } from "vite-plugin-static-copy";
export default defineConfig({
test: {
browser: {
provider: "playwright",
enabled: true,
instances: [{ browser: "chromium" }],
headless: true,
},
coverage: {
enabled: true,
exclude: ["public/*", "wasm/*"],
provider: "istanbul",
reporter: ["text", "json"],
},
},
plugins: [
babel({
babelConfig: {
babelrc: false,
configFile: false,
presets: [
["@babel/preset-typescript", { allowDeclareFields: true }],
],
plugins: [
["@babel/plugin-proposal-decorators", { version: "2023-11" }],
],
sourceMaps: "inline",
},
filter: /\.[jt]sx?$/,
}),
viteStaticCopy({
targets: [{ src: "./wasm/*.{js,wasm}", dest: "wasm" }],
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@components": path.resolve(__dirname, "./src/components"),
"@shared": path.resolve(__dirname, "./src/shared"),
"@test": path.resolve(__dirname, "./test"),
},
},
server: {
headers: {
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp",
},
},
});