tsup.config.mjs 829 B

1234567891011121314151617181920212223242526
  1. /**
  2. * Build config for @briven/cli.
  3. *
  4. * Three entries, one output package: the CLI binary plus two public
  5. * sub-exports consumers import from (`@briven/cli/schema` and
  6. * `@briven/cli/server`). briven workspace packages are inlined via
  7. * `noExternal` so the shipped tarball has no workspace refs.
  8. *
  9. * ESM-only. Node 20+ and all four supported package managers
  10. * (npm, pnpm, yarn, bun) resolve ESM packages without trouble.
  11. */
  12. export default {
  13. entry: {
  14. 'cli/index': 'src/index.ts',
  15. 'schema/index': 'src/schema.ts',
  16. 'server/index': 'src/server.ts',
  17. },
  18. format: ['esm'],
  19. dts: { resolve: true },
  20. clean: true,
  21. target: 'node20',
  22. splitting: false,
  23. sourcemap: true,
  24. noExternal: ['@briven/schema', '@briven/shared', '@briven/config'],
  25. external: ['chokidar', 'picocolors', 'tsx', 'zod', 'ulid'],
  26. };