support capacitor apk
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user