我最终使用了该脚本的修改版本从外部加载脚本。我的应用程序不需要立即进行配置,因此异步方面在这里没有什么不同。
我将其
<head>与位于同一位置的配置文件一起放在我的应用程序输入页面的顶部。
<head> ... other scripts <script> var config= window.config|| {}; $.getJSON('config.json', function(response) { config= response; }); </script></head><body> <div id='root'/> <script src='dist/app.bundle.js'></script></body>


