mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-24 17:20:51 +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:
committed by
GitHub
parent
9dec9605ed
commit
a04ea2f382
@@ -73,7 +73,7 @@ export function createConfig(options = {}) {
|
||||
banner: "if ('__TAURI__' in window) {",
|
||||
// the last `}` closes the if in the banner
|
||||
footer: `Object.defineProperty(window.__TAURI__, '${pluginJsName}', { value: ${iifeVarName} }) }`,
|
||||
file: "src/api-iife.js",
|
||||
file: "api-iife.js",
|
||||
},
|
||||
// and var is not guaranteed to assign to the global `window` object so we make sure to assign it
|
||||
plugins: [typescript(), terser(), nodeResolve()],
|
||||
|
||||
Reference in New Issue
Block a user