import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    svelte({
      compilerOptions: {
        css: 'injected',
        enableSourcemap: true
      }
    })
  ],
  server: {
    host: '0.0.0.0',
    port: 3000,
    open: true
  },
  resolve: {
    extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.svelte']
  },
  build: {
    rollupOptions: {
      onwarn(warning, warn) {
        // Ignore eval warnings from Lottie player
        if (warning.code === 'EVAL' && warning.id?.includes('lottie-player')) {
          return;
        }
        warn(warning);
      }
    }
  }
}); 