32 lines
608 B
TypeScript
32 lines
608 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwind from "@tailwindcss/vite";
|
|
import path from "path";
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
react({
|
|
babel: {
|
|
plugins: [["babel-plugin-react-compiler"]],
|
|
},
|
|
}),
|
|
tailwind(),
|
|
],
|
|
server: {
|
|
host: true,
|
|
allowedHosts: ["local.kmux.cn"],
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://local.kmux.cn:8080",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "src"),
|
|
},
|
|
},
|
|
});
|