tsdown.config.ts 719 B

123456789101112131415161718192021222324
  1. import { defineConfig } from 'tsdown'
  2. /**
  3. * logger-console ships two entries: the node exporter (index) and the
  4. * browser exporter (browser), selected via package.json `exports`
  5. * conditions. The entries are JS emitted by tsc under lib/types and are
  6. * bundled as two single-entry passes so the shared base class is inlined into
  7. * each (matching upstream's published shape) instead of split into a hash-named
  8. * chunk.
  9. */
  10. const shared = {
  11. outDir: 'lib',
  12. format: ['esm'],
  13. platform: 'node',
  14. target: 'es2024',
  15. fixedExtension: false,
  16. dts: false,
  17. clean: false,
  18. } as const
  19. export default defineConfig([
  20. { ...shared, entry: ['lib/types/index.js'] },
  21. { ...shared, entry: ['lib/types/browser.js'] },
  22. ])