Files
copilotkit__copilotkit/packages/runtime/tsdown.config.ts
Alem Tuzlak 9a6ee39d96 chore(runtime): update package config, CI workflows, and docs
- Add package.json exports for v2/{express,hono,node} subpaths
- Add elysia devDependency and tsdown entry points
- Exclude bun integration tests from vitest config
- Update CI workflows to include runtime-servers test job
- Add runtime-server-adapter docs page
- Add changeset for the fetch-based runtime feature
2026-04-03 18:41:27 +02:00

46 lines
1.2 KiB
TypeScript

import { defineConfig } from "tsdown";
export default defineConfig({
entry: [
"src/index.ts",
"src/v2/index.ts",
"src/v2/express.ts",
"src/v2/hono.ts",
"src/v2/node.ts",
"src/langgraph.ts",
],
format: ["esm", "cjs"],
dts: true,
sourcemap: true,
target: "es2022",
outDir: "dist",
unbundle: true,
banner: ({ format, fileName }) => {
// tsdown/rolldown reorders bare side-effect imports to the end of the entry chunk,
// breaking type-graphql which needs reflect-metadata at load time.
// The _virtual/_rolldown/runtime banner propagates to all output files per format,
// ensuring reflect-metadata is always the first thing that runs.
if (fileName.includes("_virtual/_rolldown/runtime")) {
return format === "cjs"
? 'require("reflect-metadata");'
: 'import "reflect-metadata";';
}
},
external: [
"@ag-ui/langgraph",
"@langchain/core",
"@langchain/openai",
"@langchain/aws",
"@langchain/community",
"@langchain/google-gauth",
"@langchain/langgraph-sdk",
"langchain",
"@anthropic-ai/sdk",
"groq-sdk",
"@whatwg-node/fetch",
"@whatwg-node/server",
"rxjs",
],
exports: true,
});