Files
olons_server/web/vite.config.ts
T
2026-10-12 20:29:27 +08:00

26 lines
560 B
TypeScript

import vue from '@vitejs/plugin-vue';
import { defineConfig, loadEnv } from 'vite';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), 'VITE_');
return {
base: env.VITE_PUBLIC_PATH || '/',
plugins: [vue()],
server: {
host: true,
port: Number(env.VITE_PORT) || 5173,
proxy: {
'/v1': {
target: env.VITE_API_TARGET || 'http://localhost:6061',
changeOrigin: true,
},
},
},
build: {
target: 'es2015',
outDir: 'dist',
},
};
});