Fix: Load runtime config before module scripts

Move config.js script to head section so it loads synchronously before
any module scripts execute. This fixes a race condition on mobile where
the app could initialize before window.CONFIG was set.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2025-12-18 14:23:39 -06:00
parent cdb9d5575f
commit 843825a956

View File

@@ -5,11 +5,11 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MotoVaultPro</title>
<!-- Runtime config MUST load synchronously before any module scripts -->
<script src="/config.js"></script>
</head>
<body>
<div id="root"></div>
<!-- Load runtime config before app initializes -->
<script src="/config.js"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>