fix(xwebview): bypass page cache in debug

这个提交包含在:
XuqmGroup 2026-07-27 16:48:52 +08:00
父节点 4a00fc39f0
当前提交 c0d7115211

查看文件

@ -513,6 +513,10 @@ export function XWebViewView({
ref={webViewRef}
source={source}
style={styles.webview}
// Debug 页面必须直接读取服务器最新资源,避免 WebView 磁盘缓存让 H5 与
// Metro 宿主代码处于不同版本。Release 仍使用系统缓存,保证正常加载性能。
cacheEnabled={!__DEV__}
cacheMode={__DEV__ ? 'LOAD_NO_CACHE' : 'LOAD_DEFAULT'}
onLoadStart={() => {
setLoadError(null)
setShowProgress(true)