Organize domain APIs and types under common/apis, shared components under named folders, and private workspace logic alongside each page. Use Bearer sessions, explicit response envelopes, session-aware routing and streams, and configurable login captcha presentation for the deployed backend contract. Preserve news, economic calendar, crawler, market, chat, Skills, settings, and demo trading workflows with responsive layouts and explicit configuration saves. Validate with frontend lint, type checking, 22 test groups, production builds, and deployed desktop/mobile page checks.
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { resolve } from "node:path"
|
|
import vue from "@vitejs/plugin-vue"
|
|
import UnoCSS from "unocss/vite"
|
|
import AutoImport from "unplugin-auto-import/vite"
|
|
import { ElementPlusResolver } from "unplugin-vue-components/resolvers"
|
|
import Components from "unplugin-vue-components/vite"
|
|
import { defineConfig } from "vite"
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"@@": resolve(import.meta.dirname, "src/common"),
|
|
"@": resolve(import.meta.dirname, "src")
|
|
}
|
|
},
|
|
server: {
|
|
// 只监听本机,通过 SSH 隧道访问;对外只走 https://alpha.134333.xyz
|
|
host: "127.0.0.1",
|
|
port: 5173,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://127.0.0.1:8000",
|
|
ws: true
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
reportCompressedSize: false,
|
|
chunkSizeWarningLimit: 2048
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
UnoCSS(),
|
|
AutoImport({
|
|
imports: ["vue", "vue-router", "pinia"],
|
|
dts: "types/auto/auto-imports.d.ts",
|
|
resolvers: [ElementPlusResolver()]
|
|
}),
|
|
Components({
|
|
dts: "types/auto/components.d.ts",
|
|
resolvers: [ElementPlusResolver()]
|
|
})
|
|
]
|
|
})
|