/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2025-06-05 10:20:42
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2025-06-06 10:44:26
 * @FilePath: /bi2025/vite.config.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [react()],
  server: {
    proxy: {
      // 代理/dashBoard前缀到后端接口
      '/api/dashBoard': {
        target: 'http://120.27.235.181:6002',
        changeOrigin: true,
        rewrite: path => path.replace(/^\/api/, '')  // 去掉 /api 前缀
      }
    }
  }
}); 