feat(config): resolve the API base at runtime from config.js
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user