Root cause: dynamic import('@tauri-apps/plugin-opener') silently fails on
Android Tauri WebView because the module resolution path for @tauri-apps/api
(plugin dependency) differs from npm expectations in the bundled context.
Rewrote tauri.ts to use window.__TAURI_INTERNALS__.invoke() directly:
- openUrl() → invoke('plugin:opener|open_url', {url})
- setupDeepLinkHandler() → invoke('plugin:deep-link|get_current')
- Warm-start listener still uses import('@tauri-apps/api/event') for
deep-link://new-url events (bundled as separate chunk by Vite)
- Added @tauri-apps/api as direct dependency
Also kept withGlobalTauri: true (needed for __TAURI_INTERNALS__ injection)
but reverted APK frontendDist back to bundled React app (../web/dist)
since redirect-to-live-web approach was unreliable.
Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
678 B
JSON
31 lines
678 B
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-config-schema/schema.json",
|
|
"productName": "ZeaVis Edu",
|
|
"version": "0.1.0",
|
|
"identifier": "com.zeavis.edu",
|
|
"build": {
|
|
"frontendDist": "../web/dist",
|
|
"devUrl": "http://localhost:5173",
|
|
"beforeBuildCommand": "cd ../web && bun run build",
|
|
"beforeDevCommand": "cd ../web && bun run dev"
|
|
},
|
|
"app": {
|
|
"withGlobalTauri": true,
|
|
"windows": [
|
|
{
|
|
"title": "ZeaVis Edu",
|
|
"width": 800,
|
|
"height": 600
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": null
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": "all"
|
|
},
|
|
"plugins": {}
|
|
}
|