penguin_coop-tg-weapp/vite.config.ts

33 lines
669 B
TypeScript
Raw Permalink Normal View History

2024-07-20 10:32:01 +08:00
/*
* @LastEditors: John
* @Date: 2024-07-13 10:21:58
* @LastEditTime: 2024-07-19 17:08:59
* @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: 8083,
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: {},
});