tsdown.config.ts 888 B

1234567891011121314151617181920212223242526272829303132
  1. import { defineConfig } from 'tsdown'
  2. /**
  3. * Root and invariant shapes as SEPARATE single-entry bundles: a multi-entry
  4. * build emits a hash-named shared chunk that the exact `files` whitelist
  5. * cannot publish (same shape as code-runtime-worker/user-approval). The node
  6. * lib is the repo-uniform shape (publint/NodeNext), not an identity-sensitive
  7. * runtime — browser consumers resolve this package through the loader module
  8. * table.
  9. */
  10. export default defineConfig([
  11. {
  12. entry: { index: 'lib/types/index.js' },
  13. outDir: 'lib',
  14. format: ['esm'],
  15. platform: 'neutral',
  16. target: 'es2024',
  17. fixedExtension: false,
  18. dts: false,
  19. clean: false,
  20. },
  21. {
  22. entry: { invariant: 'lib/types/invariant.js' },
  23. outDir: 'lib',
  24. format: ['esm'],
  25. platform: 'neutral',
  26. target: 'es2024',
  27. fixedExtension: false,
  28. dts: false,
  29. clean: false,
  30. },
  31. ])