I have a Vue.js application that has access API built on node/express. So I setup a process.env.API_URL to 'localhost' for dev and 'MyProductionServer.url' for prod. But the API_URL variable is loaded at built/compile time.
So now if I am to give the Vue app and backend app to customer. Do I need to ask them for their production server url so that I could edit the API_URL variable and build again? How can I make it dynamically so that when the Vue application start, it load a env variable at runtime instead of compile time?
Does dotenv solve this?