fix: bridge Nuxt frontend output to Rust module via /app/share

The Nuxt and Rust modules run in isolated flatpak-builder sandboxes with
separate git clones. Tauri's compile-time frontendDist resolution requires
.output/ to exist at the repo root relative to src-tauri/Cargo.toml.
Without it, tauri::generate_context!() falls back to the dev URL
http://localhost:1432, causing 'Connection refused' at runtime.

Fix:
- Nuxt module persists .output/ to /app/share/drop-frontend/
- Rust module symlinks it into the checkout before cargo build
This commit is contained in:
John Smith
2026-05-27 20:06:42 -04:00
parent 2725168516
commit 0cc0b4cffd
+2
View File
@@ -8206,6 +8206,7 @@ modules:
../flatpak-node-main/pnpm-store")|' build.mjs
- node build.mjs
- 'test -f main/.output/public/index.html && echo "Nuxt build verified: main/.output/public/index.html exists"'
- mkdir -p /app/share/drop-frontend && cp -r .output/. /app/share/drop-frontend/
- name: drop-app-rust
buildsystem: simple
build-options:
@@ -15741,6 +15742,7 @@ modules:
- echo "native_model = { path = \"$PWD/cargo/vendor/native_model\" }" >> .cargo/config.toml
- sed -i 's/"tray-icon",\?\s*//g' src-tauri/Cargo.toml
- python3 flatpak-patches/patch-tray-icon.py src-tauri/src/lib.rs
- ln -sf /app/share/drop-frontend .output
- cd src-tauri && cargo build --release
- cd ..
- install -Dm755 src-tauri/target/release/drop-app /app/bin/drop-app