20 lines
534 B
TypeScript
20 lines
534 B
TypeScript
import tailwindcss from '@tailwindcss/vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { defineConfig } from 'vite'
|
|
import pkg from './package.json'
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
'import.meta.env.VITE_APP_VERSION': JSON.stringify(pkg.version),
|
|
},
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_PROXY_TARGET ?? 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
|
},
|
|
},
|
|
},
|
|
})
|