mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
11 lines
316 B
TypeScript
11 lines
316 B
TypeScript
const devHostStartNames = ['blitzkrieg-', 'localhost'];
|
|
|
|
export default function isDev() {
|
|
return (
|
|
process.env.NODE_ENV === 'development' ||
|
|
process.env.VERCEL_ENV === 'preview' ||
|
|
(typeof window !== 'undefined' &&
|
|
devHostStartNames.some((name) => window.location.host.startsWith(name)))
|
|
);
|
|
}
|