-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathvite.config.ts
59 lines (57 loc) · 1.91 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
47
48
49
50
51
52
53
54
55
56
57
58
59
/// <reference types="vitest" />
/// <reference types="vite/client" />
/* eslint-disable import/no-extraneous-dependencies */
import { defineConfig } from "vite";
import cleanup from "rollup-plugin-cleanup";
export default defineConfig({
test: {
dir: "test",
environment: "jsdom",
setupFiles: "./test/vitest.setup.ts",
coverage: {
all: true,
enabled: true,
include: ["src"],
thresholds: { 100: true },
reporter: [
["text", { skipEmpty: true }],
["html", { skipEmpty: true }],
],
},
},
build: {
minify: false,
emptyOutDir: false,
target: "es2020",
lib: {
entry: {
index: "src/index.ts",
"utils/index": "src/utils/index.ts",
"static/index": "src/static/index.ts",
"layouts/rows": "src/layouts/rows/index.ts",
"layouts/columns": "src/layouts/columns/index.ts",
"layouts/masonry": "src/layouts/masonry/index.ts",
"client/hooks": "src/client/hooks/index.ts",
"client/rows": "src/client/rows/index.ts",
"client/columns": "src/client/columns/index.ts",
"client/masonry": "src/client/masonry/index.ts",
"client/rowsProps": "src/client/rows/resolveRowsProps.ts",
"client/columnsProps": "src/client/columns/resolveColumnsProps.ts",
"client/masonryProps": "src/client/masonry/resolveMasonryProps.ts",
"client/aggregate": "src/client/aggregate/index.ts",
"scroll/index": "src/scroll/index.ts",
"server/index": "src/server/index.ts",
"ssr/index": "src/ssr/index.ts",
"ssr/breakpoints": "src/ssr/breakpoints/index.ts",
},
formats: ["es"],
},
rollupOptions: {
external: ["react", "react/jsx-runtime"],
output: { minifyInternalExports: false },
plugins: [cleanup({ extensions: ["ts", "tsx"] })],
preserveEntrySignatures: "allow-extension",
treeshake: false,
},
},
});