waveterm/frontend/util/isdev.ts
Evan Simkowitz b51ff834b2
Happy new year! (#1684)
Update all 2024 references to 2025
2025-01-04 20:56:57 -08:00

21 lines
676 B
TypeScript

// Copyright 2025, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
import { getEnv } from "./getenv";
import { lazy } from "./util";
export const WaveDevVarName = "WAVETERM_DEV";
export const WaveDevViteVarName = "WAVETERM_DEV_VITE";
/**
* Determines whether the current app instance is a development build.
* @returns True if the current app instance is a development build.
*/
export const isDev = lazy(() => !!getEnv(WaveDevVarName));
/**
* Determines whether the current app instance is running via the Vite dev server.
* @returns True if the app is running via the Vite dev server.
*/
export const isDevVite = lazy(() => !!getEnv(WaveDevViteVarName));