| 123456789101112131415161718192021 |
- import { defineConfig } from 'vite'
- import react from '@vitejs/plugin-react'
- import tailwindcss from '@tailwindcss/vite'
- import path from 'path'
- export default defineConfig({
- // Relative asset URLs so one build works both at the server root and behind a
- // subpath reverse proxy (e.g. nginx `location /rag/`). Safe because the app
- // uses hash routing: the document path is always the mount point itself.
- base: './',
- plugins: [react(), tailwindcss()],
- resolve: { alias: { '@': path.resolve(__dirname, './src') } },
- server: {
- port: 3000,
- proxy: {
- '/api': { target: 'http://localhost:8080', changeOrigin: true },
- '/ui': { target: 'http://localhost:8080', changeOrigin: true },
- },
- },
- build: { outDir: 'dist', sourcemap: false },
- })
|