23 lines
631 B
TypeScript
23 lines
631 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
// inside export default defineConfig({ ... })
|
|
server: {
|
|
proxy: {
|
|
'/ten-am': 'http://127.0.0.1:8000',
|
|
'/ten-am-id': 'http://127.0.0.1:8000',
|
|
'/state': 'http://127.0.0.1:8000',
|
|
|
|
// NEW: grouped endpoint(s)
|
|
'/now-groups': 'http://127.0.0.1:8000',
|
|
'/api/now-groups': 'http://127.0.0.1:8000',
|
|
}
|
|
},
|
|
// Optional: keep this if you do "npm run build" to ship static files with Python
|
|
build: {
|
|
outDir: '../server/static',
|
|
emptyOutDir: true,
|
|
},
|
|
}) |