2025-12-18 10:45:13 +08:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react()],
|
|
|
|
|
server: {
|
2025-12-20 10:37:26 +08:00
|
|
|
host: '0.0.0.0',
|
2025-12-18 10:45:13 +08:00
|
|
|
port: 3000,
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': {
|
2025-12-20 08:20:51 +08:00
|
|
|
target: 'http://localhost:8000',
|
2025-12-18 10:45:13 +08:00
|
|
|
changeOrigin: true
|
2025-12-20 17:43:50 +08:00
|
|
|
},
|
|
|
|
|
'/uploads': {
|
|
|
|
|
target: 'http://localhost:8000',
|
|
|
|
|
changeOrigin: true
|
2025-12-18 10:45:13 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
build: {
|
|
|
|
|
outDir: 'dist',
|
|
|
|
|
sourcemap: true
|
|
|
|
|
}
|
|
|
|
|
});
|