Skip to content

feat(core): allow defining global API script on plugin build#9156

Merged
lucasfernog merged 6 commits into
devfrom
feat/global-api-script-plugin
Mar 12, 2024
Merged

feat(core): allow defining global API script on plugin build#9156
lucasfernog merged 6 commits into
devfrom
feat/global-api-script-plugin

Conversation

@lucasfernog
Copy link
Copy Markdown
Member

Adds tauri_plugin::Builder::global_api_script_path so plugin authors can define the JavaScript global API bindings (supposed to be injected to window.__TAURI__) at compile time, so the string is only part of the binary when withGlobalTauri is true. Currently this needs to be done manually at runtime (and it's always added to the binary via include_str).

Adds `tauri_plugin::Builder::global_api_script_path` so plugin authors can define the JavaScript global API bindings (supposed to be injected to `window.__TAURI__`) at compile time, so the string is only part of the binary when withGlobalTauri is true.
Currently this needs to be done manually at runtime (and it's always added to the binary via include_str).
@lucasfernog lucasfernog requested a review from a team as a code owner March 12, 2024 02:31
Comment thread core/tauri/src/manager/mod.rs Outdated
Comment thread core/tauri-utils/src/plugin.rs Outdated
@lucasfernog lucasfernog requested a review from amrbashir March 12, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants