/** * True in Vite dev builds (`import.meta.env.DEV`). Uses a type assertion so * `tsc` does not rely on ambient `ImportMeta` merging (vite/client). */ export function isDevBuild(): boolean { return ( typeof import.meta !== 'undefined' && (import.meta as unknown as { env?: { DEV?: boolean } }).env?.DEV === true ) }