mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-04-24 14:15:19 +00:00
25 lines
611 B
TypeScript
25 lines
611 B
TypeScript
import { defineConfig, loadEnv } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import path from 'node:path'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), '')
|
|
const apiTarget = env.VITE_API_PROXY_TARGET || 'http://localhost:1250'
|
|
return {
|
|
base: '/v2/',
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3001,
|
|
proxy: {
|
|
'/v1': { target: apiTarget, changeOrigin: true },
|
|
},
|
|
},
|
|
}
|
|
})
|