angular-runtime-env-vars
Installation
SKILL.md
Angular Runtime Env Vars
Context boundary: Each user message is an independent task. Do not carry state from previous tasks unless explicitly told to.
Priority Ordering
PRIORITY 1: Inject environment variables at runtime via server.js, not at build time. PRIORITY 2: Prevent stale values with no-cache headers on runtime-config.js. PRIORITY 3: Validate Azure App Service startup command and env var key alignment. When these conflict, always prefer correct runtime injection over convenience shortcuts.
Use this skill to make Angular prerender/static apps read environment values at runtime instead of baking values at build time.
What this skill does
- Detect how runtime config is currently loaded (
window.__...,assets/runtime-config.js,environment*.ts,index.htmlscript order). - Implement or fix server-side injection of environment variables into runtime config on process startup.
- Ensure stale values are not reused (cache headers for runtime config file).
- Validate startup/deployment behavior for Azure App Service Linux startup commands.
- Update docs so the deployed behavior matches implementation.