mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-04 19:02:33 -06:00
17 lines
527 B
TypeScript
17 lines
527 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://host.docker.internal:8080',
|
|
changeOrigin: true,
|
|
// Если бэкенд ожидает /api, rewrite не нужен.
|
|
// Если бэкенд на корне (localhost:8080/recommendations), то раскомментируй:
|
|
// rewrite: (path) => path.replace(/^\/api/, ''),
|
|
}
|
|
}
|
|
}
|
|
}) |