fix(tauri): fall back to Node server on Linux

This commit is contained in:
Shantur Rathore
2026-04-20 22:54:21 +01:00
parent 76f14e2189
commit b60d86116a
2 changed files with 80 additions and 6 deletions

View File

@@ -87,6 +87,10 @@ function ensureStandaloneServerBuild() {
})
}
function shouldBuildStandaloneServer() {
return process.platform !== "linux"
}
function ensureUiBuild() {
const loadingHtml = path.join(uiDist, "loading.html")
if (fs.existsSync(loadingHtml)) {
@@ -347,7 +351,11 @@ function copyUiLoadingAssets() {
ensureEsbuildPlatformBinary()
ensureServerDependencies()
ensureServerBuild()
ensureStandaloneServerBuild()
if (shouldBuildStandaloneServer()) {
ensureStandaloneServerBuild()
} else {
console.log("[prebuild] skipping standalone server executable for Linux packaging; linuxdeploy fails on the bundled ELF")
}
ensureUiBuild()
syncServerUiBundle()
copyServerArtifacts()