mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-05 03:12:34 -06:00
add front spa-app
This commit is contained in:
17
rmser-app/vite.config.ts
Normal file
17
rmser-app/vite.config.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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/, ''),
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user