TypeScript API / @contentia/decap / resolveContentiaBackend
Function: resolveContentiaBackend()
ts
function resolveContentiaBackend(options): ContentiaBackendModuleConfig;Select the Decap backend: config for the current build: the local JSON:API while vite dev is running, the remote OAuth backend everywhere else.
Fails safe to remote whenever the dev flag is not truthy, so an admin loaded outside a Vite-bundled dev context (a production build, a standalone admin, vite preview) never targets a phantom local endpoint. Local mode only engages when the admin config itself is built by Vite, so import.meta.env.DEV is reliably substituted.
Parameters
| Parameter | Type |
|---|---|
options | ResolveContentiaBackendOptions |