Files
gao-customer-h5/capacitor.config.ts
T

28 lines
737 B
TypeScript

import type { CapacitorConfig } from "@capacitor/cli";
/**
* 热更新检查接口
*
* 默认指向生产,可用 CAPACITOR_UPDATE_URL 覆盖后指向本地服务调试
* 更新时机由应用内控制(设置页手动检查或用户开启自动检查),插件本身不主动拉取
*/
const updateUrl = process.env.CAPACITOR_UPDATE_URL ?? "https://api.imyeyu.com/app/update/check";
if (updateUrl && !updateUrl.startsWith("https://")) {
throw new Error("热更新接口必须使用 HTTPS");
}
const config: CapacitorConfig = {
appId: "com.imyeyu.gao.customer",
appName: "糕店管理",
webDir: "dist",
plugins: {
CapacitorUpdater: {
autoUpdate: false,
updateUrl,
statsUrl: ""
}
}
};
export default config;