-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
46 lines (45 loc) · 1.22 KB
/
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
42
43
44
45
46
// @ts-nocheck
import path from "path";
import dts from "vite-plugin-dts";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
name: "bugcatch",
formats: ["es", "umd"],
entry: path.resolve(__dirname, "src/index.ts"),
fileName: (format) =>
format === "es" ? `index.js` : `index.${format}.js`,
},
rollupOptions: {
// Don't bundle built-in Node.js modules.
external: [/^node:.*/],
},
minify: true,
},
define: {
"process.env": {},
},
plugins: [tsconfigPaths(), dts()],
test: {
// https://vitest.dev/api/
globals: false,
environment: "happy-dom",
setupFiles: "./__tests__/setupTests.ts",
deps: {
inline: [],
},
coverage: {
enabled: false,
provider: "v8",
},
benchmark: {
include: ["**/*.{bench,benchmark}.?(c|m)[jt]s?(x)"],
exclude: ["node_modules", "dist", ".idea", ".git", ".cache"],
},
// Debug
logHeapUsage: true,
},
});