Here's an example where it can be done in Angular: https://www.jvandemo.com/how-to-use-environment-variables-to....
Not exactly the same as shell environment variables, of course. And you may disagree about exposing the `enableDebug` flag as a runtime config there.
Still it is doable, in a sort of roundabout way, using the browser as the environment.