@zedtech/zedkit-devtools
Gate devtools on environment
Return false when `NODE_ENV` is `production` unless `force` is set for demos.
alpha
Usage
At a glance
- Who: App roots that should tree-shake the panel out of production bundles.
- What: Return false when
NODE_ENVisproductionunlessforceis set for demos. - Use when: Before rendering
@zedtech/zedkit-devtools/react. - Avoid when: Production user-facing features — never expose
forceto end users.
Install
pnpm add @zedtech/zedkit-devtoolsLatest: 0.1.0 (via changesets).
Example
import { devtoolsEnabled } from "@zedtech/zedkit-devtools";
if (devtoolsEnabled()) {
// mount devtools in development
}Wraps: (none)