33 lines
669 B
JavaScript
33 lines
669 B
JavaScript
/*
|
|
* @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({
|
|
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/, "");
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
css: {},
|
|
});
|