Files
tools-show/client/vite.config.js

21 lines
449 B
JavaScript
Raw Normal View History

2026-04-08 17:56:12 +08:00
import { defineConfig, loadEnv } from 'vite';
2026-03-27 10:18:26 +08:00
import vue from '@vitejs/plugin-vue';
2026-04-08 17:56:12 +08:00
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const proxyTarget = env.VITE_API_PROXY_TARGET || 'http://localhost:3000';
return {
plugins: [vue()],
server: {
port: 5173,
proxy: {
'/api': {
target: proxyTarget,
changeOrigin: true,
},
2026-03-27 10:18:26 +08:00
},
},
2026-04-08 17:56:12 +08:00
};
});