30 lines
662 B
TypeScript
30 lines
662 B
TypeScript
import path from 'path'
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
export default defineConfig(({ mode }) => ({
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(process.env.npm_package_version || '0.0.0'),
|
|
__APP_ENV__: JSON.stringify(mode),
|
|
},
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
watch: {
|
|
ignored: ['**/*.rs', '**/target/**'],
|
|
},
|
|
proxy:{
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
ws: true
|
|
},
|
|
}
|
|
},
|
|
}))
|