support capacitor apk

This commit is contained in:
Timi
2026-11-05 17:49:54 +08:00
parent a204dd3211
commit fc3e39e2ac
60 changed files with 1751 additions and 5 deletions
+21
View File
@@ -0,0 +1,21 @@
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;