Files
sendou.ink/app/utils/dev-build.ts
Kalle f7372324fe
Some checks failed
E2E Tests / e2e (push) Has been cancelled
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled
E2E Tests / publish-docs-screenshots (push) Has been cancelled
Dev tools (#3471)
2026-10-25 11:43:36 +02:00

8 lines
407 B
TypeScript

/**
* True only on the Vite dev server (and in unit tests). Production builds, e2e runs included, replace
* `import.meta.env.DEV` with `false` at build time, so code behind this flag is compiled out of them.
* `import.meta.env` is undefined when Playwright bundles test code, see `IS_E2E_TEST_RUN`.
*/
export const IS_DEV_BUILD =
typeof import.meta.env !== "undefined" && import.meta.env.DEV === true;