mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
4ba201b5c4
Repairs TypeScript check-types across the monorepo and adds a CI gate so regressions are caught going forward: - core: bundler module resolution and strict-mode fixes - sdk-js: bundler module resolution; keep codegen, formatter, packaging working - react-core: fixes across components, hooks, and tests - react-native: restore catch binding referenced by TypeError cause - runtime: repair check-types and bound AI SDK schema inference - web-inspector: nodenext import extensions, export Anchor - remaining packages and node example: assorted check-types repairs - deps: add missing type-only devDependencies - license context driven from /info licenseStatus - ci: run check-types in the static quality workflow Squashed from 12 commits for a single, easily-revertable change.
60 lines
1.5 KiB
TypeScript
60 lines
1.5 KiB
TypeScript
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",
|
|
],
|
|
outputOptions(options) {
|
|
options.codeSplitting = false;
|
|
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;
|
|
},
|
|
},
|
|
]);
|