/** * Capacitor 配置:用于打包 Android APP。 * 完整文档:https://capacitorjs.com/docs/config */ import type { CapacitorConfig } from '@capacitor/cli'; const config: CapacitorConfig = { appId: 'cn.myhomepage.app', appName: 'MyHomePage', webDir: 'dist', /** 后端地址:APP 内 webview 调用 */ server: { /** 留空则使用 http.ts 的相对路径 /api(仅当 Capacitor 拦截代理可用时) */ url: undefined, /** 启用 Capacitor HTTP 拦截,让 /api 走 native 网络栈(避免 CORS) */ iosScheme: 'https', androidScheme: 'https', cleartext: true }, android: { allowMixedContent: true, captureInput: true, webContentsDebuggingEnabled: true } }; export default config;