rmm2/frontend/vite.config.js
cynfo3000 54ddc0b902 WAU Compliance: agent collector, backend endpoints, frontend badge + panel
- Agent: WAU registry config check (include/exclude URLs), pending updates count
- Backend: /wau/compliance per customer, /wau/compliance/summary all customers
- Frontend: compliance badge in customer list, compliance panel in WAU tab
- config.js: no longer gitignored (secrets-free, reads from env/window.__RMM_CONFIG__)
- vite.config.js: reads backend URL from .env instead of hardcoded value
- .env.example added for clean setup
2026-03-10 17:38:58 +01:00

24 lines
614 B
JavaScript

import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const backendHost = env.VITE_BACKEND_HOST || 'localhost'
const backendPort = env.VITE_BACKEND_PORT || '8443'
const backendUrl = `https://${backendHost}:${backendPort}`
return {
plugins: [react(), tailwindcss()],
server: {
proxy: {
'/api': {
target: backendUrl,
changeOrigin: true,
secure: false,
},
},
},
}
})