diff --git a/packages/tauri-app/scripts/prebuild.js b/packages/tauri-app/scripts/prebuild.js index fbf0a4a1..a382a8d2 100644 --- a/packages/tauri-app/scripts/prebuild.js +++ b/packages/tauri-app/scripts/prebuild.js @@ -20,6 +20,7 @@ const serverDevInstallCommand = "npm install --workspace @neuralnomads/codenomad --include-workspace-root=false --install-strategy=nested --fund=false --audit=false" const uiDevInstallCommand = "npm install --workspace @codenomad/ui --include-workspace-root=false --install-strategy=nested --fund=false --audit=false" +const serverPrepareUiCommand = "npm run prepare-ui --workspace @neuralnomads/codenomad" const envWithRootBin = { ...process.env, @@ -91,6 +92,15 @@ function ensureUiBuild() { } } +function syncServerUiBundle() { + console.log("[prebuild] syncing server public UI bundle...") + execSync(serverPrepareUiCommand, { + cwd: workspaceRoot, + stdio: "inherit", + env: envWithRootBin, + }) +} + function ensureServerDevDependencies() { if (fs.existsSync(braceExpansionPath)) { return @@ -246,6 +256,7 @@ function copyUiLoadingAssets() { ensureServerDependencies() ensureServerBuild() ensureUiBuild() + syncServerUiBundle() copyServerArtifacts() stripNodeModuleBins() copyUiLoadingAssets()