Static Files

Drop any file into app/public/ and it's served directly at its URL — images, fonts, CSS, JSON, WASM, anything.

How it works

Files in app/public/ are served at the root with the correct Content-Type automatically. No route file, no import, no config required.

file → URLbash
app/public/
├── favicon.ico          →  /favicon.ico
├── robots.txt           →  /robots.txt
├── logo.png             →  /logo.png
├── main.css             →  /main.css
└── fonts/
    └── inter.woff2      →  /fonts/inter.woff2

Referencing public files

Use root-relative paths in your components. The leading / maps to app/public/:

app/pages/layout.tsxtypescript
import { useHtml } from 'nukejs'

export default function Layout({ children }: { children: React.ReactNode }) {
    useHtml({
        link: [
            { rel: 'icon', href: '/favicon.ico' },
            { rel: 'stylesheet', href: '/main.css' },
        ]
    })
    return (
        <>
            <img src="/logo.png" alt="Logo" width={120} height={40} />
            {children}
        </>
    )
}

Deployment behaviour

EnvironmentHow public files are served
nuke devBuilt-in middleware serves them before any routing
nuke build (Node)Copied to dist/static/, served by the Node HTTP server
nuke build (Vercel)Copied to .vercel/output/static/ — served by Vercel's CDN, zero function invocations
✅
Public files are free on VercelStatic files served from the CDN don't count against your function invocation quota. Put everything that doesn't need server logic in app/public/.