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 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
cdb9d5575f
commit
843825a956
+2
-2
@@ -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>
|
||||
Reference in New Issue
Block a user