Skip to content

Commit 49d60f4

Browse files
committed
refactor: simplify browser-echo initialization in router
- Removed the VITE_BROWSER_ECHO_ENABLED variable from environment configuration. - Updated the condition for enabling browser-echo to only check for the development environment, streamlining the initialization process.
1 parent 28fcd5b commit 49d60f4

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

infra/ansible/group_vars/constructa/vars.example.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,3 @@ constructa_env:
9797
POLAR_PRODUCT_BUSINESS_MONTHLY: ''
9898
POLAR_PRODUCT_CREDITS_50: ''
9999
POLAR_PRODUCT_CREDITS_100: ''
100-
101-
# Frontend logging helpers
102-
VITE_BROWSER_ECHO_ENABLED: 'false'

src/router.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ import { NotFound } from './components/NotFound';
66
import { routeTree } from './routeTree.gen';
77

88
// Initialize browser-echo for TanStack Start (manual import required)
9-
const enableBrowserEcho =
10-
import.meta.env.DEV || import.meta.env.VITE_BROWSER_ECHO_ENABLED === 'true';
11-
12-
if (enableBrowserEcho && typeof window !== 'undefined') {
9+
if (import.meta.env.DEV && typeof window !== 'undefined') {
1310
void import('virtual:browser-echo');
1411
}
1512

0 commit comments

Comments
 (0)