32 lines
894 B
TypeScript
Executable file
32 lines
894 B
TypeScript
Executable file
import path from 'path';
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vite';
|
|
|
|
// Docker/E2E configuration - uses published packages from npm registry
|
|
// instead of local development paths. For unpublished packages, uses stubs.
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
// Stubs for unpublished packages (no longer needed - all packages published)
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
host: true, // Allow external connections (needed for Docker)
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_URL || 'http://localhost:3100',
|
|
changeOrigin: true,
|
|
},
|
|
'/ml': {
|
|
target: process.env.VITE_ML_URL || 'http://localhost:8100',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/ml/, ''),
|
|
},
|
|
},
|
|
},
|
|
});
|