ionian/packages/client/vite.config.ts

21 lines
456 B
TypeScript
Raw Normal View History

import { defineConfig, loadEnv } from 'vite'
import path from 'node:path'
import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
proxy: {
'/api': env.API_BASE_URL ?? 'http://localhost:8000',
}
}
}})