import { defineBuildConfig } from 'unbuild';

export default defineBuildConfig({
  entries: [
    'src/index',
    'src/components/index',
    'src/hooks/index',
    'src/api/index',
    'src/types/index'
  ],
  declaration: true,
  clean: true,
  rollup: {
    emitCJS: true,
    esbuild: {
      target: 'node18',
      jsx: 'automatic'
    }
  },
  externals: [
    'react',
    'react-dom',
    'react-router',
    '@tanstack/react-query',
    'axios',
    'zod',
    '@hookform/resolvers',
    'react-hook-form',
    'sonner',
    'lucide-react',
    'class-variance-authority',
    'clsx',
    'tailwind-merge',
    'date-fns',
    'dayjs',
    'hono'
  ]
});