-
-
Notifications
You must be signed in to change notification settings - Fork 741
Expand file tree
/
Copy pathvite.config.ts
More file actions
55 lines (54 loc) · 1.58 KB
/
Copy pathvite.config.ts
File metadata and controls
55 lines (54 loc) · 1.58 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 * as path from "path";
import { defineConfig, type UserConfig } from "vite-plus";
// https://vitejs.dev/config/
export default defineConfig(
(conf) =>
({
run: {
tasks: {
build: {
command: "tsc",
input: [
{ auto: true },
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
},
test: {
command: "vp test --run",
input: [
{ auto: true },
{ pattern: "!**/.next/**", base: "workspace" },
{
pattern: "!tests/nextjs-test-app/node_modules/**",
base: "workspace",
},
],
},
},
},
test: {
environment: "jsdom",
setupFiles: ["./vitestSetup.ts"],
include: ["./src/unit/**/*.test.ts", "./src/unit/**/*.test.tsx"],
},
resolve: {
alias:
conf.command === "build"
? ({
"@shared": path.resolve(__dirname, "../shared/"),
} as Record<string, string>)
: ({
"@shared": path.resolve(__dirname, "../shared/"),
// load live from sources with live reload working
"@blocknote/core": path.resolve(
__dirname,
"../packages/core/src/",
),
"@blocknote/react": path.resolve(
__dirname,
"../packages/react/src/",
),
} as Record<string, string>),
},
}) as UserConfig,
);