mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-08-05 18:18:37 +02:00
refactor: only inject API IIFE script when withGlobalTauri is true (#1071)
* refactor: only inject API IIFE script when withGlobalTauri is true * fmt * update tauri
This commit is contained in:
@@ -103,14 +103,11 @@ pub fn hostname() -> String {
|
||||
#[derive(Template)]
|
||||
#[default_template("./init.js")]
|
||||
struct InitJavascript {
|
||||
#[raw]
|
||||
global_os_api: &'static str,
|
||||
eol: &'static str,
|
||||
}
|
||||
|
||||
pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
let init_js = InitJavascript {
|
||||
global_os_api: include_str!("api-iife.js"),
|
||||
#[cfg(windows)]
|
||||
eol: "\r\n",
|
||||
#[cfg(not(windows))]
|
||||
|
||||
Reference in New Issue
Block a user