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

// Vite config — served at editor.gigafibre.ca behind Traefik in prod.
// In dev: `npm run dev` exposes http://localhost:5173.
// Base path is '/' since this is a standalone microservice (own domain), not
// a sub-path of another app.
export default defineConfig({
  plugins: [react()],
  server: {
    port: 5173,
    host: '0.0.0.0',     // accessible from outside container in dev
  },
  build: {
    outDir: 'dist',
    assetsDir: 'assets',
    sourcemap: false,
  },
})
