Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Mar 12, 2024

Conversation

lucasfernog
Copy link
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
core/tauri/src/manager/mod.rs Outdated Show resolved Hide resolved
core/tauri-utils/src/plugin.rs Outdated Show resolved Hide resolved
@lucasfernog lucasfernog merged commit e227fe0 into dev Mar 12, 2024
24 checks passed
@lucasfernog lucasfernog deleted the feat/global-api-script-plugin branch March 12, 2024 15:01
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