I'm building a Vue app that works as a SPA that gets rendered by my Express backend. In this Vue app I'm using environment variables. One of these variables is an API key to an external API service. Obviously I don't want to show the whole world my API key, however after I run the build command it includes all the env variables in the Javascript files, which I believe makes it accessible to anyone.
What would be the right way to go here? Should I make a route in my Express backend that handels requests to this external API, so that I can safely store my API key on the server side? Or is there a way to make my Vue app autonomously send requests to the external API without having to show the API key?
I'm using Vue 2 by the way.