21 lines
514 B
TypeScript
21 lines
514 B
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
const API_TARGET = process.env.VITE_API_TARGET || 'http://127.0.0.1:8787'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) }
|
|
},
|
|
server: {
|
|
port: 5273,
|
|
strictPort: false,
|
|
proxy: {
|
|
'/api': { target: API_TARGET, changeOrigin: true }
|
|
}
|
|
},
|
|
build: { outDir: 'dist', emptyOutDir: true }
|
|
})
|