fix(tauri): extra path level in runner.rs

This file is one folder deeper than the other files which reference this env. This env is a relative folder reference so we need to concat an extra folder traversal into it.
This commit is contained in:
Jacob Bolda
2020-02-19 08:00:23 -06:00
parent 43f32edc01
commit eb1034b4f3

View File

@@ -63,7 +63,7 @@ pub(crate) fn run(application: &mut App) -> crate::Result<()> {
#[cfg(feature = "dev-server")]
webview
.handle()
.dispatch(|_webview| _webview.eval(include_str!(concat!(env!("TAURI_DIR"), "/tauri.js"))))?;
.dispatch(|_webview| _webview.eval(include_str!(concat!("../", env!("TAURI_DIR"), "/tauri.js"))))?;
// spawn the embedded server on our server url
#[cfg(feature = "embedded-server")]
@@ -237,7 +237,7 @@ fn build_webview(
// inject the tauri.js entry point
webview
.handle()
.dispatch(|_webview| _webview.eval(include_str!(concat!(env!("TAURI_DIR"), "/tauri.js"))))?;
.dispatch(|_webview| _webview.eval(include_str!(concat!("../", env!("TAURI_DIR"), "/tauri.js"))))?;
}
Ok(webview)