import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import path from "path";

export default defineConfig({
  plugins: [tailwindcss(), react()],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "./src"),
      "semi-ui.css": path.resolve(__dirname, "./node_modules/@douyinfe/semi-ui/dist/css/semi.min.css"),
    },
  },
  server: {
    port: 3000,
    proxy: {
      "/api": {
        target: "http://43.106.118.91:3000",
        changeOrigin: true,
      },
    },
  },
});
