---
title: "Front-End Web Deep Dive: Runtime Config"
description: "Heroku's Front-End Web Cloud Native Buildpack provides runtime configuration for static web apps by writing PUBLIC_WEB_-prefixed environment variables into the HTML <head> as data-* attributes each time the bundled static server starts."
url: "https://swe.quest/articles/front-end-web-deep-dive-runtime-config-e96590c65250b21e"
canonical: "https://www.heroku.com/blog/front-end-web-deep-dive-runtime-config/"
source: "Heroku Engineering"
published: "2026-10-15"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 2
tags: ["frontend","configuration","deployment","javascript"]
---

# Front-End Web Deep Dive: Runtime Config

A post on [Heroku Engineering](https://swe.quest/sources/heroku.md), published 2026-10-15, 2 min read, Announcement. Original: [https://www.heroku.com/blog/front-end-web-deep-dive-runtime-config/](https://www.heroku.com/blog/front-end-web-deep-dive-runtime-config/)

## Summary

Heroku's Front-End Web Cloud Native Buildpack provides runtime configuration for static web apps by writing PUBLIC\_WEB\_-prefixed environment variables into the HTML \<head\> as data-\* attributes each time the bundled static server starts. JavaScript reads them via document.head.dataset, so values like API URLs can change between staging and production without a rebuild. Unlike the older create-react-app-buildpack, which rewrote the JS bundle, this approach is framework-agnostic and does not conflict with CSP or Subresource Integrity. Existing apps may need refactoring so config values are read at runtime rather than captured at build time.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Configuration management](https://swe.quest/tags/configuration.md) (Reliability & operations)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- environment variables
- static site builds
- HTML data attributes

## Keywords

Heroku, Cloud Native Buildpacks, Twelve-Factor App, create-react-app-buildpack, Content-Security-Policy, Subresource Integrity

## Related posts

- [Migrate a Rails App from Heroku to Render](https://swe.quest/articles/migrate-a-rails-app-from-heroku-to-render-a8a375d8766a19ae.md): Render · 2022-05-23 · Medium · 8 min read · Ruby, Infrastructure as code, Deployment, Cloud platforms
  Migrating the open-source git-scm.org Rails app from Heroku to Render means mapping Heroku concepts (web/worker processes, dynos, Heroku Postgres/Redis, Scheduler, config vars) to Render equivalents and codifying the whole stack in a render.yaml Blueprint.
- [Best-in-Class Developer Experience with Vite and Hydrogen](https://swe.quest/articles/best-in-class-developer-experience-with-vite-and-hydrogen-71158a029a23fe79.md): Shopify Engineering · 2022-03-31 · Easy · 8 min read · Build systems, Frontend, React, JavaScript, Developer productivity
  Shopify's Hydrogen storefront framework is built on Vite. Vite serves user code as native ES Modules and pre-bundles and caches only third-party dependencies, which speeds up dev-server startup and hot module replacement compared with bundle-based tools like Webpack.
- [Optimizing Our Build Times by Migrating from Webpack to Rspack](https://swe.quest/articles/optimizing-our-build-times-by-migrating-from-webpack-to-rspack-0081a00fe51c01d6.md): Yelp Engineering · 2026-05-20 · Medium · 6 min read · Build systems, JavaScript, Frontend, Performance engineering, Refactoring & migrations
  Yelp moved its JavaScript monorepo builds from Webpack to Rspack and cut integration build time by about 52% on average.
- [How to add Monaco to a Next.js app and securely run untrusted user code](https://swe.quest/articles/how-to-add-monaco-to-a-next-js-app-and-securely-run-untrusted-user-code-1a2e3adbb0c82f79.md): Deno · 2024-02-29 · Medium · 9 min read · React, Sandboxing & isolation, Serverless, Frontend, JavaScript
  A Next.js 14 app can host a browser IDE by embedding the Monaco editor via @monaco-editor/react, then sending the editor contents to server-side API routes that call the Deno Deploy Subhosting API.
- [The Best Declarative Deploy Configs in 2026](https://swe.quest/articles/the-best-declarative-deploy-configs-in-2026-351946d82d9f0be8.md): Railway · 2026-10-14 · Medium · 17 min read · Infrastructure as code, Deployment, Cloud platforms, Configuration management
  Railway, Render, Fly.io, Vercel and Netlify differ mainly in how much of an application's infrastructure their deploy config can reproduce.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
