I've a react library that is said to get the config URL from windows object on runtime like below.
window.config.api_url
And in the consumer application which uses the library, i'm trying to set this like, so that library can access to this api url
window.config = { api_url: 'http://something.com}
But it's not working and it's always undefined, if I put a console in the library
console.log(window.config.api_url)