import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'

export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
    },
  },
  server: {
    host: true,
    port: parseInt(process.env.PORT || '5173'),
    allowedHosts: [
      'localhost',
      '.letsgetnashty.com',
      'h2h.host.letsgetnashty.com',
      'h2h-backend.host.letsgetnashty.com',
      'h2h-frontend.host.letsgetnashty.com',
    ],
  },
})
