30 lines
684 B
TypeScript
30 lines
684 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import path from 'path'
|
|
|
|
const APP_VERSION = process.env.VITE_APP_VERSION || 'unknown';
|
|
const APP_GITSHA = process.env.VITE_APP_GITSHA || 'unknown';
|
|
|
|
export default defineConfig({
|
|
base: './',
|
|
plugins: [react(), tailwindcss()],
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(APP_VERSION),
|
|
__APP_GITSHA__: JSON.stringify(APP_GITSHA),
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|