feat(build): base44 build + build step in deploy (ask / --build / --no-build) - #581
Closed
davidsu wants to merge 1 commit into
Closed
feat(build): base44 build + build step in deploy (ask / --build / --no-build)#581davidsu wants to merge 1 commit into
davidsu wants to merge 1 commit into
Conversation
base44 build runs site.buildCommand with VITE_BASE44_APP_ID injected — the CLI-blessed way to produce a bundle that knows its app. A bare npm run build has no id source (the template no longer bakes it and the vite-plugin carries no fallbacks), so the deployed site dead-ends on /api/apps/null/... (observed live). base44 deploy and base44 site deploy now offer that build: interactive runs ask, --build / --no-build pre-answer, non-interactive default stays upload-only. eject keeps its own build and opts out explicitly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 30, 2026
Contributor
Author
|
Unified into #580 per David's directive (2026-07-30: one cli PR for the whole local-dev rescope). The branch feat/base44-build was merged into feat/dev-remote-vite-plugin-template verbatim — all 8 build/deploy specs and the QA verdicts transfer. Nothing here is dropped. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
Adds a first-class build step to the CLI. A new
base44 buildcommand runs the project's configuredsite.buildCommandwithVITE_BASE44_APP_IDinjected, so built bundles always carry the linked app's id instead of relying on a manually maintained.env. Bothbase44 deployandbase44 site deploycan now run that build immediately before uploading — interactive runs prompt for it, and--build/--no-buildpre-answer the prompt for scripts and CI.Related Issue
None
Type of Change
Changes Made
base44 buildcommand (cli/commands/project/build.ts), registered inprogram.ts. Requires a linked local project and throwsConfigInvalidErrorotherwise.site-build.tsmodule with two helpers:runSiteBuild()— executessite.buildCommandviaexeca(shell, cwd = project root) withVITE_BASE44_APP_IDset to the linked app id, wrapped inrunTask()for spinner/success/error messaging. ThrowsConfigNotFoundErrorwith a hint when nobuildCommandis configured.shouldBuildBeforeDeploy()— resolution order: nobuildCommand→ never build; explicit--build/--no-buildwins; non-interactive without a flag → don't build; otherwise prompt via@clack/promptsconfirm(a cancelled prompt means don't build).base44 deploy: added--build/--no-buildflags; builds before deploying resources when the project has asite.outputDirectoryand an app is linked.deployActionnow takes the fullCLIContextso it can pass it torunSiteBuild.base44 site deploy: same--build/--no-buildflags and build-before-upload behaviour.base44 eject: passesbuild: falseto its internaldeployActioncall so ejecting never triggers an unexpected build.tests/cli/build.spec.tscovering build success with the app id injected, missingbuildCommand, running outside a project,deploy --build/--no-build/ flag-absent-in-non-interactive,site deploy --build, and a failing build aborting the deploy. Two new fixtures (with-buildable-site,with-failing-build) whose build commands write/inspectVITE_BASE44_APP_ID.@biomejs/biomeremoved from rootdevDependencies.Testing
Checklist
Additional Notes
🤖 Generated by Claude | 2026-07-30 07:33 UTC | 421f370