refactor: use Vite built-in DEV flag instead of VITE_OAUTH_ENABLED

import.meta.env.DEV is already true during `bun run dev` and false in
production builds, so a separate env var is unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 21:19:34 +01:00
parent d51c6da18d
commit 4dfef88f19
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -2,5 +2,4 @@
VITE_API_URL=https://opal.example.com/api
VITE_AUTH_URL=https://auth.example.com
# OAuth — set to "false" for local dev (used with `opal server start --dev`)
VITE_OAUTH_ENABLED=true
# OAuth (not needed for local dev — Vite's DEV mode auto-skips auth)
+1 -1
View File
@@ -17,7 +17,7 @@ import { getItem, setItem, removeItem } from '$lib/utils/storage.js';
*/
const STORAGE_KEY = 'opal_auth';
const DEV_MODE = import.meta.env.VITE_OAUTH_ENABLED === 'false';
const DEV_MODE = import.meta.env.DEV;
/**
* Load auth state from localStorage