Skip to main content

Function: isDevHost()

function isDevHost(host): boolean;

Defined in: host.ts:48

Dev hosts short-circuit to evaluating when no usable token is present (docs/15 §4.2–§4.3):

  • web: localhost, 127.0.0.1, [::1], *.local — on http/https only: §4.2 pins WebView schemes (capacitor://localhost, ionic://) as NOT dev origins even though their hostname is literally localhost; a packaged WebView app is a production surface and must list its scheme in apps[];
  • native: Expo dev client / any bundle with __DEV__ === true;
  • node/SSR/CI: always — there is no production end-user surface on a server render, and §4.2 pins SSR to evaluating snapshots. Treating node as a dev host is what makes the §4.3 deriveState (copied verbatim) produce that without a special case.

Parameters

ParameterType
hostHostIdentity

Returns

boolean