feat(config): resolve the API base at runtime from config.js

This commit is contained in:
LincPay
2026-08-15 17:01:45 +05:30
parent aa1484c285
commit 39ca34be68
4 changed files with 82 additions and 3 deletions
+7
View File
@@ -11,6 +11,13 @@
</head>
<body>
<div id="root"></div>
<!--
Runtime config, loaded before the app and deliberately not a module: a
classic script blocks until it has run, so window.__UDYAM_CONFIG__ is set
before any module code reads it. Served unbundled from the static root so
the API base can be changed on the server without rebuilding.
-->
<script src="/config.js"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>