mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 04:46:26 +00:00
新增uni-app移动端工程,包含登录、首页、工作台、个人中心等页面,集成uView-plus组件库,优化移动端开发体验。同时更新文档和README,增加移动端相关内容。
30 lines
683 B
JavaScript
30 lines
683 B
JavaScript
import { fileURLToPath, URL } from 'node:url'
|
|
import { defineConfig } from "vite";
|
|
import uni from "@dcloudio/vite-plugin-uni";
|
|
import UnoCSS from 'unocss/vite'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
uni(),
|
|
UnoCSS(),
|
|
],
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 5180,
|
|
proxy: {
|
|
[process.env.VITE_API_BASE_NAME]: {
|
|
target: process.env.VITE_API_BASE_URL,
|
|
secure: false, // 请求是否为https
|
|
changeOrigin: true, // 是否跨域
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
}
|
|
}
|
|
});
|