-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrolldown.config.ts
More file actions
59 lines (57 loc) · 1.63 KB
/
Copy pathrolldown.config.ts
File metadata and controls
59 lines (57 loc) · 1.63 KB
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
import { defineConfig } from "rolldown";
import dts from "unplugin-dts/rolldown";
const entries = {
index: "./src/index.ts",
"server/index": "./src/server/index.ts",
"server/next": "./src/server/next.ts",
"server/tanstack": "./src/server/tanstack.ts",
"server/web": "./src/server/web.ts",
"server/node": "./src/server/node.ts",
"handlers/index": "./src/handlers/index.ts",
"handlers/next": "./src/handlers/next.ts",
"handlers/tanstack": "./src/handlers/tanstack.ts",
"handlers/web": "./src/handlers/web.ts",
"handlers/node": "./src/handlers/node.ts",
};
export default defineConfig([
{
input: entries,
output: { dir: "dist/esm", format: "esm", entryFileNames: "[name].js" },
resolve: { tsconfigFilename: "tsconfig.json" },
platform: "neutral",
external: [
"react",
"react-dom",
"react/jsx-runtime",
"appwrite",
"node-appwrite",
"server-only",
"@tanstack/react-query",
"@tanstack/react-start/server",
"@tanstack/react-start/server-only",
"next/headers",
"node:http",
],
plugins: [dts({ outDirs: ["dist/esm"] })],
},
{
input: entries,
output: { dir: "dist/cjs", format: "cjs", entryFileNames: "[name].cjs" },
resolve: { tsconfigFilename: "tsconfig.json" },
platform: "neutral",
external: [
"react",
"react-dom",
"react/jsx-runtime",
"appwrite",
"node-appwrite",
"server-only",
"@tanstack/react-query",
"@tanstack/react-start/server",
"@tanstack/react-start/server-only",
"next/headers",
"node:http",
],
plugins: [dts({ outDirs: ["dist/cjs"] })],
},
]);