Static sites
Build the files, then serve them with a static web server.
This pack does not compile a language runtime. For JS frontends, Node.jsruns npm run build first. See Buildpacksfor detection order.
Detects
static.tomlin the base directory, or- A known static JS framework (Vite, Astro without a server adapter, Angular, Gatsby, and similar), or
package.jsonwith abuildscript and no server entrypoint (server.js,index.js, …)
Next.js, Nuxt, and other SSR frameworks stay on the Node pack and are not served as static files, unless Next is set to output: 'export'.
Output directory
Resolved in this order:
output-dirinstatic.toml- The framework default (
dist,out,build,public,_site, Angular’s nesteddist/…/browser) - The first of those folders that contains
index.html
output-dir = "dist"
fallback = "index.html"fallback is the SPA rewrite. If you omit it and index.html exists, Nodion uses that.
Start command
static-web-server on 0.0.0.0:$PORT (8080 if PORT is unset), with compression. Override with a Procfile if you must.