Files
gao-customer-h5/capacitor.config.ts
T
2026-11-05 17:49:54 +08:00

22 lines
507 B
TypeScript

import type { CapacitorConfig } from "@capacitor/cli";
const updateUrl = process.env.CAPACITOR_UPDATE_URL;
if (updateUrl && !updateUrl.startsWith("https://")) {
throw new Error("热更新接口必须使用 HTTPS");
}
const config: CapacitorConfig = {
appId: "com.imyeyu.gao.customer",
appName: "糕店管理",
webDir: "dist",
plugins: {
CapacitorUpdater: {
autoUpdate: updateUrl ? "atBackground" : false,
...(updateUrl ? { updateUrl } : {}),
statsUrl: ""
}
}
};
export default config;