mirror of
https://github.com/Heretek-AI/drop-flatpak.git
synced 2026-07-01 10:04:29 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user