There's a slew of workarounds offered in that github issue, most people (including another team in my org) opted to just rebuild the app every time a docker container is created which kind of defeats one of the major pros of using docker IMO.
I ultimately ended up forking off this repository and customizing it to my needs https://github.com/beam-australia/react-env
that solution in itself is very hacky.
as far as I know, vue doesn't have this feature either but I think next.js and nuxt.js does.