Pulastya B
feat: Initial commit - Data Science Agent with React frontend and FastAPI backend
226ac39
raw
history blame contribute delete
754 Bytes
import path from 'path';
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, '.', '');
return {
server: {
port: 3000,
host: '0.0.0.0',
proxy: {
'/api': {
target: env.VITE_API_URL || 'http://localhost:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
},
plugins: [react()],
define: {
'import.meta.env.VITE_API_URL': JSON.stringify(env.VITE_API_URL || 'http://localhost:8080')
},
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
}
}
};
});