frontgen writes VITE_ZINO_API_URL=SAME_ORIGIN for custom-domain placements.
The old expression passed that string straight through as BASE_URL, so every
API call went to /SAME_ORIGIN/app/434/... which the SPA fallback answers with
index.html — the page rendered and no data loaded.
Absolute platform URL is still used for the preview mount and local dev.
'draft' is the authoring working copy and only exists on the env where the
pipeline is edited (dev). On a consumer env (qa) only published versions are
deployed, so a draft call returns 'starter node not found'. 'latest' resolves
to the latest published version, which exists on every env (matches how
DailySalesReportPage already calls it).
The mount path is set per-placement by the frontgen server's <base href>
(/krishna-sales/ on qa). The hardcoded /krishna_sales basename didn't match,
so the Router refused to render. Read it from the document base so one
artifact serves any mount path.
- vite base './' (relative asset refs) so one build serves any mount path
- index.html carries <!--BASE_HREF--> placeholder + ./config.js ref
- BASE_URL reads window.__RUNTIME_CONFIG__.VITE_ZINO_API_URL (placement-
written) with a dev fallback
Required by frontgen 1600 assertBuildOutput + the dev->qa frontend
release model (target writes config.js from its own ZINO_API_URL).