feat: local-dev rescope — base44 dev --remote, template on vite-plugin, base44 build, deploy --build - #580
Open
davidsu wants to merge 3 commits into
Open
feat: local-dev rescope — base44 dev --remote, template on vite-plugin, base44 build, deploy --build#580davidsu wants to merge 3 commits into
davidsu wants to merge 3 commits into
Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.1.6-pr.580.b42a66aPrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.1.6-pr.580.b42a66a"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.1.6-pr.580.b42a66a"
}
}
Preview published to npm registry — try new features instantly! |
|
Cryptoease |
This was referenced Jul 30, 2026
davidsu
added a commit
that referenced
this pull request
Jul 30, 2026
…44 build, deploy --build The full #580 feature set, rebuilt on top of the decoupled serveCommand runner (#582). dev --remote is now just: resolve the configured serveCommand (or fail), resolve the app's published URL (or fail), run the same runner local dev uses — no backend, no parallel implementation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
davidsu
force-pushed
the
feat/dev-remote-vite-plugin-template
branch
from
July 30, 2026 13:01
2253db8 to
bee958d
Compare
…44 build, deploy --build The full #580 feature set, rebuilt on top of the decoupled serveCommand runner (#582). dev --remote is now just: resolve the configured serveCommand (or fail), resolve the app's published URL (or fail), run the same runner local dev uses — no backend, no parallel implementation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
davidsu
force-pushed
the
feat/dev-remote-vite-plugin-template
branch
from
July 30, 2026 13:09
bee958d to
474fd00
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
This PR rescopes local development so the Base44 app id is injected by the CLI at serve/build time instead of being baked into scaffolded source. It adds a
base44 buildcommand, an opt-in build step forbase44 deploy/base44 site deploy(--build/--no-build), andbase44 dev --remotefor running the local frontend against the production backend. Thebackend-and-clienttemplate moves onto the same client convention editor-created apps use (@base44/vite-plugin+src/lib/app-params.js, SDK client on same-origin/api).Related Issue
None
Type of Change
Changes Made
New
base44 buildcommandcli/commands/project/build.tsruns the project'ssite.buildCommandwithVITE_BASE44_APP_IDset to the linked app id; requires a linked project (ConfigInvalidErrorotherwise). Registered inprogram.ts.cli/commands/project/site-build.tsholds the shared helpers:runSiteBuild()(runs the command throughexecainsiderunTask, throwsConfigNotFoundErrorwith a config hint whensite.buildCommandis missing) andshouldBuildBeforeDeploy()(explicit flag > non-interactive default offalse> confirm prompt).Build before deploy
base44 deployandbase44 site deploygain--build/--no-build; interactive runs prompt, non-interactive runs default to not building. Project deploy only offers it whensite.outputDirectoryis configured.ejectpassesbuild: falseso its internal deploy keeps its current behaviour.scaffold-shared.tsinjectsVITE_BASE44_APP_IDinto the post-create build.core/site/deploy.tsmissing-output hints now point atbase44 buildinstead of a barenpm run build.base44 dev --remotesite.serveCommand, withVITE_BASE44_APP_IDandVITE_BASE44_APP_BASE_URLpointed at the app's published URL fromgetSiteUrl(); no local backend is started.site.serveCommand, or when--portis combined with--remote.dev.tssplit intoremoteDevAction/localDevActionwith shared helpersresolveConfiguredSite()andstopRunnerOnProcessSignals(); the remote runner exits with the frontend's exit code.ServeCommandRunnerOptionsis now exported so the newConfiguredSitetype can be aPickof it.Template (
backend-and-client)vite.config.jsnow uses@base44/vite-plugin(which supplies the@alias and proxies/apito the local dev backend) alongside@vitejs/plugin-react.src/api/base44Client.js.ejs(app id hardcoded at scaffold time) replaced by a staticsrc/api/base44Client.jsthat reads from the newsrc/lib/app-params.js, withserverUrl: ''for same-origin API calls.@base44/sdkto^0.8.40and added@base44/vite-plugin^1.0.30.Tests & changelog
tests/cli/build.spec.ts:buildhappy path and failure modes,deploy --build/--no-build/ default,site deploy --build, and build-failure propagation. New fixtureswith-buildable-siteandwith-failing-build.dev --remotecases intests/cli/dev.spec.ts(published-URL injection, missing URL,--portrejection, missingserveCommand, exit propagation) and acreatecase asserting the new template convention.CHANGELOG.mdupdated under Added / Changed.Testing
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
The template change affects newly scaffolded projects only; existing projects with a hardcoded
appIdkeep working. Since the app id now comes fromVITE_BASE44_APP_ID, a barenpm run buildno longer produces a correctly configured bundle — usebase44 build(orbase44 deploy --build), which is why the missing-output deploy hint was reworded.Not done here:
docs/was not updated for the newbuildcommand or the--remote/--buildflags, and the test suite was not executed in this environment (nonode_modules/distpresent), so the 'tested locally' and 'all tests pass' boxes are left unchecked.🤖 Generated by Claude | 2026-07-30 13:52 UTC | b42a66a