import react from '@vitejs/plugin-react';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
import { defineConfig } from 'vite';
import tailwindcss from '@tailwindcss/vite';
import { fumadocsMdx } from 'fumadocs-mdx/vite';
import story from '@fumadocs/story/vite';

export default defineConfig({
  server: {
    port: 3000,
  },
  resolve: {
    external: ['typescript'],
    tsconfigPaths: true,
  },
  plugins: [
    fumadocsMdx(),
    tailwindcss(),
    story(),
    tanstackStart({
      prerender: {
        enabled: true,
      },
    }),
    react(),
  ],
});
