Files
nianxx-h5/vite.config.ts
DEV_DSW 9d0890b541 refactor: update env configs, replace uni-ui and fix issues
- add VITE_CLIENT_ID environment variable to all .env files, adjust API and socket URLs across dev/staging/prod environments
- update request utility to use env var for client ID instead of hardcoded "6"
- refactor GoodDetail component: replace uni-icons with van-icon, switch markdown renderer to vue3-markdown-it
- refactor Calendar component: swap uni-popup for van-popup, remove deprecated SCSS styles, update markup and toast calls
- fix ImageSwiper: rename handler methods, update preview navigation to use vue router, remove redundant code
- correct margin class syntax in goods index page
2026-05-28 10:18:04 +08:00

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://abroadbiz.nianxx.com",
changeOrigin: true,
ws: true,
secure: false,
},
},
},
});