Rendering & SSR

isDev

Build-time constant that is true in development output and false in production output.


Import

import { isDev } from "@solidjs/web";

Type signature

const isDev: boolean;

Examples

import { isDev } from "@solidjs/web";
if (isDev) {
console.warn("debug-only path");
}
if (isDev) {
console.warn("Development-only diagnostic");
}

Caveats

  • It is a build-time constant. Code behind if (isDev) is removed from production output.

Learn more

Last updated: 9/27/26, 8:11 AMEdit this pageReport an issue with this page