tsup.config.ts 838 B

12345678910111213141516171819202122232425262728293031
  1. import { defineConfig } from "tsup"
  2. export default defineConfig({
  3. entry: ["src/index.ts"],
  4. format: ["esm"],
  5. dts: true,
  6. clean: true,
  7. sourcemap: true,
  8. target: "node20",
  9. platform: "node",
  10. banner: {
  11. js: "#!/usr/bin/env node",
  12. },
  13. // Bundle workspace packages that export TypeScript
  14. noExternal: ["@roo-code/core", "@roo-code/core/cli", "@roo-code/types", "@roo-code/vscode-shim"],
  15. external: [
  16. // Keep native modules external
  17. "@anthropic-ai/sdk",
  18. "@anthropic-ai/bedrock-sdk",
  19. "@anthropic-ai/vertex-sdk",
  20. // Keep @vscode/ripgrep external - we bundle the binary separately
  21. "@vscode/ripgrep",
  22. // Optional dev dependency of ink - not needed at runtime
  23. "react-devtools-core",
  24. ],
  25. esbuildOptions(options) {
  26. // Enable JSX for React/Ink components
  27. options.jsx = "automatic"
  28. options.jsxImportSource = "react"
  29. },
  30. })