fix(web): force dynamic rendering for runtime env injection #437
Reference in New Issue
Block a user
Delete Branch "fix/runtime-env-dynamic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
layout.tsxusesprocess.env[key]insideruntimeEnvScript()to inject runtime env vars intowindow.__MOSAIC_ENV__process.envcaptures the CI build-arg value (api.mosaicstack.dev) instead of the Docker runtime env var (mosaic-api.woltje.com)export const dynamic = "force-dynamic"forces per-request rendering so container env vars are read at runtimeTest plan
window.__MOSAIC_ENV__contains runtime value after deployment