-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
30 lines (29 loc) · 793 Bytes
/
vite.config.ts
File metadata and controls
30 lines (29 loc) · 793 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
28
29
30
import { join } from "node:path";
import type { ConfigEnv } from "vite";
import { NodeConfig } from "vite-config-custom";
// == Vite Config =============================================================
// https://vitejs.dev/config/#build-lib
export default (viteConfigEnv: ConfigEnv) => {
const packageDir = process.cwd();
return NodeConfig(viteConfigEnv, {
build: {
lib: {
entry: {
index: join(packageDir, "src", "index.ts"),
compat: join(packageDir, "src", "compat.ts"),
"rules/createRuntimeFn": join(
packageDir,
"src",
"rules",
"createRuntimeFn.ts"
)
}
},
rollupOptions: {
output: {
manualChunks: undefined
}
}
}
});
};