fix(build): fixed Webview2 runtime path in development, closes #4308

This commit is contained in:
Lucas Nogueira
2022-06-10 16:40:16 -03:00
parent d335fae92c
commit 8a63489567
2 changed files with 10 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri-build": patch
---
Copy `tauri.conf.json > tauri.bundle.windows.webview_fixed_runtime_path` as a resource to the target directory to fix development usage of a fixed Webview2 runtime path.

View File

@@ -270,6 +270,11 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
if let Some(tray) = config.tauri.system_tray {
resources.push(tray.icon_path.display().to_string());
}
#[cfg(windows)]
if let Some(fixed_webview2_runtime_path) = &config.tauri.bundle.windows.webview_fixed_runtime_path
{
resources.push(fixed_webview2_runtime_path.display().to_string());
}
copy_resources(ResourcePaths::new(resources.as_slice(), true), target_dir)?;
#[cfg(target_os = "macos")]