I ran into an issue where I would need to get the app url from env in my vue template. And I found out that to get something from env in vue, they need a prefix "VUE_APP". Eventually resolved it by using: window.location.origin+'/'. Thing is, I wont always have control over the naming of env or the customer (or if they insist on NOT putting anything on constant.php). And someday I might require something that cant be replicated by anything else. Is there a way to get env variables without the prefix?
Note: I know this has been asked before here: Vue cli env without prefix VUE_APP
But all this says is: dont do this. So what can I do if I face something like this? Is there a workaround or do I just pray that I dont get screwed by the requirements?