Wire index.html to actually load /env.js before the Vite bundle so the runtime config injected by docker/entrypoint.sh takes effect. Add a public/env.js stub so local dev and static builds don't 404 — the Docker container overwrites it via the entrypoint. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 lines
400 B
JavaScript
7 lines
400 B
JavaScript
// Stub env file for local dev and static build.
|
|
// In Docker, docker/entrypoint.sh overwrites /usr/share/nginx/html/env.js
|
|
// with values from APP_* environment variables at container start.
|
|
// In dev/build without Docker, this empty stub keeps window.__APP_CONFIG__
|
|
// undefined so src/config/env.ts falls back to VITE_APP_* or defaults.
|
|
window.__APP_CONFIG__ = window.__APP_CONFIG__ || undefined;
|