1 Star 0 Fork 0

叶码/hm-vue3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.js 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
zhangye 提交于 2025-04-03 17:17 +08:00 . feat: 登录逻辑完善
import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import VueAutoImport from "unplugin-auto-import/vite";
export default defineConfig({
envPrefix: "HY_", //为自定义开头名
plugins: [
uni(),
VueAutoImport({
// 引入的文件类型
include: [
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
/\.vue$/,
/\.vue\?vue/, // .vue
],
// 全局导入注册
imports: [
// 预设引入npm包
"vue",
"uni-app",
"vue-router",
],
dirs: ["hooks"],
dts: "auto-import.d.ts",
eslintrc: {
enabled: false, // Default `false`
filepath: "./.eslintrc-auto-import.json", // Default `./.eslintrc-auto-import.json`
globalsPropValue: true, // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
},
}),
],
build: {
// sourcemap: process.env.NODE_ENV === 'development',
// minify: 'terser',
// // 发布时删除 console
// terserOptions: {
// compress: {
// drop_console: true,
// },
// },
},
// resolve: {
// alias: {
// '@': fileURLToPath(new URL('./src', import.meta.url))
// }
// },
server: {
host: "0.0.0.0",
port: 8088, //启动端口
proxy: {
"/api": {
target: "http://192.168.10.102:8080",
changeOrigin: true,
//类比与webpack里面的pathRewrite
rewrite: path => path.replace(/^\/api/, ""),
},
"/formalapi": {
target: "https://hongcai365.com",
changeOrigin: true,
//类比与webpack里面的pathRewrite
rewrite: path => path.replace(/^\/formalapi/, ""),
},
},
},
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ye-code/hm-vue3.git
git@gitee.com:ye-code/hm-vue3.git
ye-code
hm-vue3
hm-vue3
master

搜索帮助