perf: 优化安卓WebView性能与调试配置

MainActivity中为WebView启用硬件加速、DOM存储、数据库及默认缓存模式,提升性能与兼容性。capacitor.config.ts开启webContentsDebugging,便于调试排查问题。
This commit is contained in:
谦君
2025-12-26 23:44:22 +08:00
parent 6dbca76252
commit 010ea137ac
2 changed files with 10 additions and 4 deletions

View File

@@ -12,8 +12,8 @@ const config: CapacitorConfig = {
keystorePath: undefined,
keystoreAlias: undefined
},
// 用 WebView 文本缩放,防止系统字体设置影响布局
webContentsDebuggingEnabled: false,
// 用 WebView 调试,方便排查问题
webContentsDebuggingEnabled: true,
allowMixedContent: false
},
plugins: {