The question about injecting Environment Variables after bundling with Webpack is already asked and answered.
The answer is always based on loading the updated Environment Variables inside the index.html
file.
But when using Webpack Module Federation, we are exposing only a component.js
file, so how can I bundle the source during the docker build
phase, but read the Environment Variables during the serving phase (when running our bundle as a pod inside k8s, for example).