window.__TAURI__ undefined on open local webserver URL #4828
-
I run, as sidecar, a rust web server on port 7878 that works fine delivering static HTML. And I have in my {
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
"build": {
"beforeBuildCommand": "yarn build",
"beforeDevCommand": "yarn dev",
"devPath": "http://localhost:3000",
"distDir": "../dist",
"withGlobalTauri": true
},
...
} But when I open a URL from sidecar rust web server, I open with: const localServer = new WebviewWindow('local-rust-web-server', {
url: 'http://localhost:7878/',
}); And if try use |
Beta Was this translation helpful? Give feedback.
Answered by
FabianLars
Aug 2, 2022
Replies: 1 comment
-
This is expected behavior. Tauri's apis won't be injected into windows with external-ish urls |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
igorjacauna
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is expected behavior. Tauri's apis won't be injected into windows with external-ish urls
Edit: See here for a similar issue (that got resolved in a hacky way)