forked from TypeCellOS/BlockNote
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
27 lines (26 loc) · 852 Bytes
/
vite.config.ts
File metadata and controls
27 lines (26 loc) · 852 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
import * as path from "path";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig((conf) => ({
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>),
},
}));