- add vite dev proxy for `/ingress` to forward requests to backend https://onefeel.brother7.cn - update .env.development to use relative proxy paths instead of full backend URLs - move SpriteAnimator component to correct directory, update all imports and global type declarations in components.d.ts - remove unused CSS styles and fix styling for ChatTopNavBar component, including switching to van-icon and hardcoding temporary site name - uncomment and enable the ChatMainList component in home page - clean up unused code, fix formatting, and set default client ID in src/utils/request.ts - comment out redundant uni API calls in ChatMainList to simplify code - update WebSocket URL handling to support relative paths in ChatMainList
51 lines
1.1 KiB
TypeScript
51 lines
1.1 KiB
TypeScript
import vue from "@vitejs/plugin-vue";
|
|
import AutoImport from "unplugin-auto-import/vite";
|
|
import Components from "unplugin-vue-components/vite";
|
|
import { VantResolver } from "@vant/auto-import-resolver";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import viteLegacy from "@vitejs/plugin-legacy";
|
|
import viteVueJsx from "@vitejs/plugin-vue-jsx";
|
|
import path from "path";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
resolvers: [VantResolver()],
|
|
}),
|
|
Components({
|
|
resolvers: [VantResolver()],
|
|
}),
|
|
viteLegacy(),
|
|
viteVueJsx(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.join(__dirname, "./src"),
|
|
},
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
api: "modern-compiler",
|
|
silenceDeprecations: ["legacy-js-api"],
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 5174,
|
|
open: false,
|
|
proxy: {
|
|
"/ingress": {
|
|
target: "https://onefeel.brother7.cn",
|
|
changeOrigin: true,
|
|
ws: true,
|
|
secure: false,
|
|
},
|
|
},
|
|
},
|
|
});
|