mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-28 17:38:53 +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:
@@ -13,6 +13,7 @@ const COMMANDS: &[&str] = &[
|
||||
|
||||
fn main() {
|
||||
if let Err(error) = tauri_plugin::Builder::new(COMMANDS)
|
||||
.global_api_script_path("./api-iife.js")
|
||||
.android_path("android")
|
||||
.ios_path("ios")
|
||||
.try_build()
|
||||
|
||||
@@ -48,7 +48,6 @@ impl<R: Runtime, T: Manager<R>> crate::ClipboardExt<R> for T {
|
||||
/// Initializes the plugin.
|
||||
pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
Builder::new("clipboard-manager")
|
||||
.js_init_script(include_str!("api-iife.js").to_string())
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
commands::write_text,
|
||||
commands::read_text,
|
||||
|
||||
Reference in New Issue
Block a user