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>
23 lines
475 B
JSON
23 lines
475 B
JSON
{
|
|
"name": "zeavis-edu",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "moon run :dev",
|
|
"build": "moon run shared:build api:build web:build",
|
|
"typecheck": "moon run :typecheck"
|
|
},
|
|
"devDependencies": {
|
|
"@moonrepo/cli": "^2.2.5",
|
|
"typescript": "^6.0.3"
|
|
},
|
|
"workspaces": [
|
|
"apps/*",
|
|
"packages/*"
|
|
],
|
|
"dependencies": {
|
|
"@tauri-apps/api": "2.11.0",
|
|
"@tauri-apps/plugin-deep-link": "2.4.9",
|
|
"@tauri-apps/plugin-opener": "2.5.4"
|
|
}
|
|
}
|