tsdown.config.ts 740 B

123456789101112131415161718192021222324252627282930
  1. import { defineConfig } from 'tsdown'
  2. /**
  3. * Package-shape override (see the root tsdown.config.ts): besides the default lib/index.js
  4. * bundle, the worker BOOTSTRAP ships as its own sibling entry — `new Worker(new
  5. * URL('./worker.js', import.meta.url))` loads it as a file, so it cannot be part of the index
  6. * bundle.
  7. */
  8. export default defineConfig([
  9. {
  10. entry: ['lib/types/index.js'],
  11. outDir: 'lib',
  12. format: ['esm'],
  13. platform: 'node',
  14. target: 'es2024',
  15. fixedExtension: false,
  16. dts: false,
  17. clean: false,
  18. },
  19. {
  20. entry: ['lib/types/worker.js'],
  21. outDir: 'lib',
  22. format: ['esm'],
  23. platform: 'node',
  24. target: 'es2024',
  25. fixedExtension: false,
  26. dts: false,
  27. clean: false,
  28. },
  29. ])