27 lines
657 B
JavaScript
Executable File
27 lines
657 B
JavaScript
Executable File
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import svgr from 'vite-plugin-svgr'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), svgr()],
|
|
server: {
|
|
host: true,
|
|
allowedHosts: ['dev.msf.enode', 'demo-msf.kis-npo.ru'],
|
|
proxy: {
|
|
'/ai-api': {
|
|
target: 'http://192.168.2.39:5134',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/ai-api/, ''),
|
|
},
|
|
'/api': {
|
|
target: 'http://localhost:3000',
|
|
ws: true,
|
|
changeOrigin: true,
|
|
bypass(req, res, options) {
|
|
console.log('Proxying request:', req.url);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
}); |