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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user