import { defineConfig, loadEnv } from "vite"; import vue from "@vitejs/plugin-vue"; import UnoCSS from "unocss/vite"; // import basicSsl from "@vitejs/plugin-basic-ssl"; import { resolve } from "path"; // https://vite.dev/config/ export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd()); console.log(env); return { plugins: [vue(), UnoCSS(), // basicSsl() ], server: { port: 4444, host: "0.0.0.0", // https: true as unknown as any, proxy: { "/index/api/webrtc": { target: "http://webrtc.test.7games.store", secure: false, changeOrigin: true, rewrite: (path) => { console.log(path); return path; }, }, "/pc": { target: "http://smapi.test.7games.store", secure: false, changeOrigin: true, rewrite: (path) => { console.log(path); return path; }, }, }, }, resolve: { alias: { "@": resolve(__dirname, "src"), }, }, }; });