-
-
Notifications
You must be signed in to change notification settings - Fork 883
/
vite.config.mjs
40 lines (37 loc) · 1.18 KB
/
vite.config.mjs
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
/// <reference types="vitest" />
import { defineConfig } from "vitest/config";
import solidPlugin from "vite-plugin-solid";
import { resolve } from "path";
const rootDir = resolve(__dirname);
export default defineConfig({
plugins: [solidPlugin()],
server: {
port: 3000
},
test: {
coverage: {
provider: "c8",
reporter: ["text", "lcov"],
include: ["src/**/*.ts", "store/src/**/*.ts", "web/src/**/*.ts"],
exclude: ["**/*.d.ts", "src/server/*.ts", "store/src/**/server.ts"]
},
environment: "jsdom",
transformMode: { web: [/\.[jt]sx?$/] },
// otherwise, solid would be loaded twice:
deps: { registerNodeLoader: true },
// if you have few tests, try commenting one
// or both out to improve performance:
threads: false,
isolate: false,
globals: true
},
resolve: {
conditions: ["development", "browser"],
alias: {
rxcore: [resolve(rootDir, "../../packages/solid/web/src/core")],
"solid-js/jsx-runtime": [resolve(rootDir, "../../packages/solid/src/jsx")],
"solid-js/web": [resolve(rootDir, "../../packages/solid/web/src")],
"solid-js": [resolve(rootDir, "../../packages/solid/src")]
}
}
});