My question is simple as the title itself. I know that we can manually create and define environment variables based on the environment mode development or production. Or even we can create specific situations and dynamically import components and files based on the environment variables.
But here is my question in depth; Is there a way to define environment variables from outside? I mean not typing all of them in the .env file but sending the list of variables via an API or a backend service.
The second part of my question, is there a way to update value of an environment variable in the run time? I know that we have to serve the whole project again when we change an environment variable but I want to change the value of a specific environment variable based on a condition.
I want to change the whole template of the vue project, in other words, I need to recompile some specific components like Sidebar, Topbar, Footer, ContentMenu etc... I thought that I could do it with conditions based on environment variables. I defined theme variables in .env and I dynamically import the components based on theme selections and modes. But sometimes I will need to update some of my environment variables and more important, I need to declare them outside and pass into the Vue project. Is there a way to do it, or is it just my imagination? :) Thanks in advance.