2024-07-18 18:51:17 +08:00
|
|
|
/*
|
|
|
|
* @LastEditors: John
|
|
|
|
* @Date: 2024-07-13 10:21:58
|
|
|
|
* @LastEditTime: 2024-07-18 14:47:48
|
|
|
|
* @Author: John
|
|
|
|
*/
|
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
import path from "path";
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2024-07-19 19:33:22 +08:00
|
|
|
server: {
|
|
|
|
host: "192.168.10.167",
|
|
|
|
port: 8082,
|
|
|
|
proxy: {
|
|
|
|
"/dev": {
|
|
|
|
target: "http://192.168.10.100:8096",
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: function (path) {
|
|
|
|
return path.replace(/^\/dev/, "");
|
|
|
|
},
|
|
|
|
},
|
2024-07-18 18:51:17 +08:00
|
|
|
},
|
|
|
|
},
|
2024-07-19 19:33:22 +08:00
|
|
|
plugins: [react()],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
"@": path.resolve(__dirname, "./src"),
|
|
|
|
},
|
2024-07-18 18:51:17 +08:00
|
|
|
},
|
2024-07-19 19:33:22 +08:00
|
|
|
css: {},
|
2024-07-18 18:51:17 +08:00
|
|
|
});
|