import { defineConfig } from 'vite'

export default defineConfig({
  // Ensure assets are properly copied and referenced
  build: {
    // Use default esbuild minifier (faster and built-in)
    minify: 'esbuild',
    // Keep the original structure for easier integration
    rollupOptions: {
      output: {
        // Maintain clean asset naming
        assetFileNames: 'assets/[name].[hash].[ext]',
        chunkFileNames: 'assets/[name].[hash].js',
        entryFileNames: 'assets/[name].[hash].js'
      }
    }
  },
  // Configure dev server
  server: {
    port: 3000,
    open: true
  },
  // Handle file extensions
  resolve: {
    extensions: ['.ts', '.js', '.json']
  }
})
