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
60 lines (59 loc) · 1.66 KB
/
Copy pathtsdown.config.ts
File metadata and controls
60 lines (59 loc) · 1.66 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
60
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"],
exports: {
customExports: (exports) => ({
...exports,
"./styles.css": "./dist/index.css",
}),
},
},
{
entry: ["src/index.tsx"],
format: ["umd"],
globalName: "CopilotKitReactTextarea",
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",
slate: "Slate",
"slate-react": "SlateReact",
"slate-history": "SlateHistory",
"tailwind-merge": "tailwindMerge",
clsx: "clsx",
"@emotion/css": "emotionCss",
cmdk: "cmdk",
"@radix-ui/react-slot": "RadixReactSlot",
"class-variance-authority": "classVarianceAuthority",
"@radix-ui/react-label": "RadixReactLabel",
"@mui/material/Chip/Chip.js": "MuiChip",
"@mui/material/Avatar/Avatar.js": "MuiAvatar",
"lodash.merge": "lodashMerge",
};
return options;
},
},
]);