2026-07-30 13:55:28 +08:00
|
|
|
import tailwindcss from "@tailwindcss/vite"
|
2026-07-24 18:00:22 +08:00
|
|
|
import react from "@vitejs/plugin-react"
|
|
|
|
|
import path from "path"
|
|
|
|
|
import { defineConfig } from "vite"
|
|
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
export default defineConfig({
|
2026-07-30 13:55:28 +08:00
|
|
|
plugins: [react(), tailwindcss()],
|
|
|
|
|
resolve: {
|
2026-07-24 18:00:22 +08:00
|
|
|
alias: {
|
|
|
|
|
"@": path.resolve(__dirname, "./src"),
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-08-13 18:28:20 +08:00
|
|
|
server: {
|
|
|
|
|
proxy: {
|
|
|
|
|
"/api": "http://192.168.3.6:5000",
|
2026-08-24 15:23:23 +08:00
|
|
|
"/article": "http://192.168.3.6:5000",
|
2026-09-08 16:19:40 +08:00
|
|
|
"/user/UserScore": {
|
|
|
|
|
target: "https://php-api.juip.com",
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
secure: false,
|
|
|
|
|
},
|
2026-08-13 18:28:20 +08:00
|
|
|
"/user": "http://192.168.3.6:5000",
|
|
|
|
|
"/product": {
|
|
|
|
|
target: "http://192.168.3.6:5000",
|
|
|
|
|
bypass(req) {
|
|
|
|
|
if (req.headers?.accept?.includes("text/html")) {
|
|
|
|
|
return "/index.html"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-08-18 13:33:22 +08:00
|
|
|
"/script": "https://php-api.juip.com",
|
2026-09-03 14:37:18 +08:00
|
|
|
"/http": {
|
|
|
|
|
target: "https://php-api.juip.com",
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
secure: false,
|
|
|
|
|
},
|
|
|
|
|
"/agent": {
|
|
|
|
|
target: "https://php-api.juip.com",
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
secure: false,
|
|
|
|
|
},
|
|
|
|
|
"/realname": {
|
|
|
|
|
target: "https://php-api.juip.com",
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
secure: false,
|
|
|
|
|
},
|
|
|
|
|
"/tencent": {
|
|
|
|
|
target: "https://php-api.juip.com",
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
secure: false,
|
|
|
|
|
},
|
2026-09-08 16:19:40 +08:00
|
|
|
"/order": {
|
|
|
|
|
target: "https://php-api.juip.com",
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
secure: false,
|
|
|
|
|
},
|
|
|
|
|
"/ros": {
|
|
|
|
|
target: "https://php-api.juip.com",
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
secure: false,
|
|
|
|
|
},
|
2026-08-13 18:28:20 +08:00
|
|
|
},
|
|
|
|
|
},
|
2026-07-30 13:55:28 +08:00
|
|
|
})
|