forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsdown.config.ts
More file actions
59 lines (58 loc) · 1.51 KB
/
Copy pathtsdown.config.ts
File metadata and controls
59 lines (58 loc) · 1.51 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 "tsdown";
export default defineConfig([
{
entry: ["src/index.tsx"],
format: ["esm", "cjs"],
dts: true,
sourcemap: true,
target: "es2022",
outDir: "dist",
external: [
"react",
"react-dom",
"@copilotkit/core",
"@copilotkit/react-core/v2",
],
exports: {
customExports: (exports) => ({
...exports,
"./styles.css": "./dist/index.css",
"./v2/styles.css": "./dist/v2/index.css",
}),
},
},
{
entry: ["src/index.tsx"],
format: ["umd"],
globalName: "CopilotKitReactUI",
sourcemap: true,
target: "es2018",
outDir: "dist",
external: [
"react",
"react-dom",
"@copilotkit/react-core",
"@copilotkit/shared",
"@copilotkit/runtime-client-gql",
],
codeSplitting: false,
outputOptions(options) {
options.entryFileNames = "[name].umd.js";
options.globals = {
react: "React",
"react-dom": "ReactDOM",
"react/jsx-runtime": "ReactJsxRuntime",
"@copilotkit/react-core": "CopilotKitReactCore",
"@copilotkit/shared": "CopilotKitShared",
"@copilotkit/runtime-client-gql": "CopilotKitRuntimeClientGQL",
"@headlessui/react": "HeadlessUIReact",
"react-markdown": "ReactMarkdown",
"react-syntax-highlighter": "ReactSyntaxHighlighter",
"remark-gfm": "remarkGfm",
"remark-math": "remarkMath",
"rehype-raw": "rehypeRaw",
};
return options;
},
},
]);