mirror of
https://github.com/Funkoala14/KnowledgeBase_OOIN.git
synced 2025-06-08 05:28:16 +08:00
24 lines
580 B
JavaScript
24 lines
580 B
JavaScript
import { defineConfig, loadEnv } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd());
|
|
|
|
return {
|
|
plugins: [react()],
|
|
build: {
|
|
outDir: '../dist',
|
|
},
|
|
server: {
|
|
port: env.VITE_PORT,
|
|
proxy: {
|
|
'/api': {
|
|
target: env.VITE_API_URL || 'http://81.69.223.133:58008',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|