tsdown.config.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import { defineConfig } from 'tsdown'
  2. const shared = {
  3. format: 'esm' as const,
  4. platform: 'node' as const,
  5. target: 'es2024',
  6. fixedExtension: false,
  7. dts: false,
  8. deps: {
  9. neverBundle: [/^@deepseek-ai\//],
  10. onlyBundle: false as const,
  11. },
  12. }
  13. /** Compile measured benchmark workers while keeping workspace packages on their built `lib` entries. */
  14. export default defineConfig([
  15. {
  16. ...shared,
  17. entry: { 'terminal-io.worker': 'terminal-io/terminal-io.worker.ts' },
  18. outDir: '.dsh-build/terminal-io',
  19. clean: true,
  20. tsconfig: 'tsconfig.host.json',
  21. },
  22. {
  23. ...shared,
  24. entry: { 'reconnect.worker': 'active-stream-reconnect/reconnect.worker.client.ts' },
  25. outDir: '.dsh-build/active-stream-reconnect',
  26. clean: true,
  27. tsconfig: 'tsconfig.client.json',
  28. },
  29. {
  30. ...shared,
  31. entry: {
  32. 'agent-continuation.worker': 'agent-continuation/agent-continuation.worker.ts',
  33. 'child-catalog.worker': 'agent-continuation/child-catalog.worker.ts',
  34. 'profile-continuation.worker': 'agent-continuation/profile-continuation.worker.ts',
  35. 'profile-adapter': 'agent-continuation/profile-adapter.ts',
  36. },
  37. outDir: '.dsh-build/agent-continuation',
  38. clean: true,
  39. tsconfig: 'tsconfig.host.json',
  40. },
  41. {
  42. ...shared,
  43. entry: { 'session-open.worker': 'session-open/session-open.worker.ts' },
  44. outDir: '.dsh-build/session-open',
  45. clean: true,
  46. tsconfig: 'tsconfig.host.json',
  47. },
  48. {
  49. ...shared,
  50. entry: {
  51. 'conversation-fold.worker': 'conversation-fold/conversation-fold.worker.client.ts',
  52. },
  53. outDir: '.dsh-build/conversation-fold',
  54. clean: true,
  55. tsconfig: 'tsconfig.client.json',
  56. },
  57. ])