瀏覽代碼

fix: enable desktop devtol

Jonathan Kelley 3 年之前
父節點
當前提交
7ce34ad97e
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      packages/desktop/src/lib.rs

+ 4 - 0
packages/desktop/src/lib.rs

@@ -173,6 +173,10 @@ pub fn launch_with_props<P: 'static + Send>(
                     webview = webview.with_custom_protocol(name, handler)
                 }
 
+                if cfg!(debug_assertions) {
+                    webview = webview.with_dev_tool(true);
+                }
+
                 desktop.webviews.insert(window_id, webview.build().unwrap());
             }