-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
41 lines (39 loc) · 928 Bytes
/
vite.config.ts
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
/// <reference types="vitest" />
/// <reference types="vite/client" />
import { defineConfig } from "vite";
import { resolve } from "path";
export default defineConfig(() => {
if (process.env.BUILD_TYPE === "example") {
return {
build: {
outDir: "dist-example"
}
};
} else {
return {
test: {
environment: "jsdom",
watch: false,
globals: true,
coverage: {
include: ["src/**/*.ts"],
all: true,
statements: 0,
branches: 0,
functions: 0,
lines: 0
}
},
build: {
target: "ESNext",
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, "src/index.ts"),
name: "Web Digraph",
// the proper extensions will be added
fileName: "web-digraph"
}
}
};
}
});