Files
zeavis-edu/apps/web/vite.config.ts
T

25 lines
643 B
TypeScript
Raw Normal View History

2026-05-22 12:41:55 +00:00
import react from '@vitejs/plugin-react';
import tsconfigPaths from 'vite-tsconfig-paths';
2026-05-22 12:41:55 +00:00
import path from 'node:path';
import { defineConfig, loadEnv } from 'vite';
import { metricsPlugin } from './vite-plugin-metrics';
2026-05-22 12:41:55 +00:00
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const apiProxyTarget = env.VITE_API_PROXY_TARGET || 'http://localhost:3000';
return {
plugins: [react(), tsconfigPaths(), metricsPlugin()],
server: {
proxy: {
'/api': apiProxyTarget,
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
2026-05-22 12:41:55 +00:00
},
};
2026-05-22 12:41:55 +00:00
});