Minimal Reproducable Example of runtime variable substitution with import-meta-env
using Vite
and Docker
To Reproduce:
- Install Packages
npm i
- Build docker image
docker build . -t vite-runtime-vars-docker
- Run docker image
docker run -d -p 5173:80 --env TEST=test
- Observe that variables are not available in the console.