reserva_chatmotel/vite.config.ts
Rodribm10 f4980f026c feat(fase4-c): tenant resolver + theming dinamico
- src/lib/tenant.ts: resolve slug por subdominio (fallback env)
- src/lib/appConfig.ts: carrega tenant + app_config do Supabase
- TenantProvider: aplica CSS vars, Google Fonts dinamico, title/favicon
- useAppConfig + useTenantId hooks
- App.tsx renderiza titulo/subtitulo/tagline/footer do config
- catalogoService filtra todas queries por tenant_id
- useReservationForm aguarda tenantId antes de buscar
- Testes mockam TenantProvider + useAppConfig
- vite.config: host: true + allowedHosts (tunnel-friendly)
- chatwootApi: header ngrok-skip-browser-warning
2026-04-14 21:06:16 -03:00

32 lines
711 B
TypeScript

import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import path from 'node:path'
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
port: 5180,
strictPort: true,
host: true,
// Aceita qualquer host — usado quando rodamos atrás de um tunnel (loca.lt, ngrok, cloudflared)
allowedHosts: true,
},
preview: {
port: 5180,
strictPort: true,
host: true,
allowedHosts: true,
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: './src/__tests__/setup.ts',
},
})