We are using Webpack, React, Node.JS but I think this question is more generic that the specific technologies. I can use Webpack to configure the SPA when building for deve
One way is to rewrite the contents of the HTML file upon deploy.
You can have a placeholder string, e.g. "$MY_CONFIG_HERE$
" in your HTML.
This can be in an some inline javascript tag on the page, which will set a javascript object on window
.
Then have your deploy process (Continuous Deploy) replace that string with the actual javascript object containing the data you want.
Then, the data will be available on window
to your javascript running in the Single Page App.