API reference › @evolu/common › Platform › isDev
const isDev: boolean;
Defined in: packages/common/src/Platform.ts:24
True outside production builds.
Bundlers (webpack, Vite, esbuild, Metro) replace the text
process.env.NODE_ENV statically at build time, so in production bundles
this expression folds to false and code behind it is dead-code-eliminated —
the same mechanism React uses. The typeof guard makes the runtime read safe
where no bundler ran, such as un-bundled browser ESM, where it fails closed
to production behavior. Node.js reads it natively; React Native polyfills it.
A missing NODE_ENV counts as development, matching React semantics.