23 lines
496 B
TypeScript
23 lines
496 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
host: '0.0.0.0', // 监听所有网络接口
|
|
port: 3000,
|
|
allowedHosts: 'all',
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_URL || 'http://localhost:33001',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
hmr: {
|
|
host: 'performance-appraisal.excn.top',
|
|
protocol: 'wss',
|
|
clientPort: 443,
|
|
},
|
|
},
|
|
});
|