uni-app 配置env环境变量

在项目根目录新建几个.env.x,例如

.env.development
.env.alpha
.env.beta
.env.production

注意,这里面的名字不是乱起的,不是你想搞成什么名字就是什么名字,必须得是VITE_开头,不要问我为什么,我只想静静,也不要问我静静是谁 …

VITE_BASE_URL=http://www.baidu.com
(import.meta as any).env.VITE_BASE_URL;

HBuilderX 开发 uni-app 无法唤醒微信小程序开发工具

哎,又开始赶鸭子上架了 😌 …

uni-app搞什么飞机 😡 …

08:54:42.318 [微信小程序开发者工具] [error] IDE service port disabled. To use CLI Call, please enter y to confirm enabling CLI capability, or manually open IDE -> Settings -> Security Settings, and set Service Port On.
08:54:42.322 [微信小程序开发者工具] For more details see: https://developers.weixin.qq.com/miniprogram/en/dev/devtools/cli.html
08:54:42.325 [微信小程序开发者工具] [error] 工具的服务端口已关闭。要使用命令行调用工具,请在下方输入 y 以确认开启,或手动打开工具 -> 设置 -> 安全设置,将服务端口开启。
08:54:42.331 [微信小程序开发者工具] 详细信息: https://developers.weixin.qq.com/miniprogram/dev/devtools/cli.html
08:54:42.337 [微信小程序开发者工具]
08:54:42.337 [微信小程序开发者工具]
08:54:42.340 [微信小程序开发者工具] ? Enable IDE Service (y/N) 

阅读更多