import { defineConfig } from 'tsup';

export default defineConfig({
  entry: {
    index: 'src/index.ts',
    'types/index': 'src/types/index.ts',
    'client/index': 'src/client/index.ts',
    'nestjs/index': 'src/nestjs/index.ts',
    'widgets/index': 'src/widgets/index.ts',
  },
  format: ['esm'],
  dts: true,
  clean: true,
  sourcemap: true,
  external: [
    'react',
    'react-dom',
    '@nestjs/common',
    '@nestjs/core',
    'rxjs',
    'recharts',
  ],
  // Don't bundle NestJS decorators require reflect-metadata
  banner: {
    js: '// @lilith/analytics - Generic analytics platform',
  },
});
