Tauri之嵌入固定版本Webview2
Tauri在Windows运行时依赖Webview2,不过现阶段Webview2的坑还是不少,而且会偷偷自动更新,这里介绍直接嵌入固定版本Webview2到Tauri应用的方法
-
到官网或者WebView2RuntimeArchive下载对应版本的cab文件
-
解压cab到src-tauri下,比如:Microsoft.WebView2.FixedVersionRuntime.115.0.1901.203.x64
-
在tauri.cong.json里设置webviewInstallMode
"webviewInstallMode": { "type": "fixedRuntime"