Static files
How build output is deployed as versioned static assets and served without compute.
Files your build produces, such as JavaScript and CSS bundles, images, fonts,
prerendered HTML, and files from public/, are deployed as static assets and
served without invoking a function. A MISS on a static file means Easel
fetched it from the deployment's storage, not that your code ran.
Versioned with the deployment
Static files belong to one deployment. A preview and production can hold different files at the same path without overwriting each other, and promoting a deployment switches every file at once. Rollback restores the previous deployment's files along with its code. See Promote and roll back.
Don't link to a preview deployment URL as a permanent asset origin. Previews can be deleted or protected independently of production.
Output directory
Easel detects the output directory for supported frameworks, such as dist
for Vite and Astro. Full-stack frameworks deploy static assets alongside their
functions. To override the build command, root directory, or output
directory, see Build configuration.
Paths are case-sensitive: /images/Logo.svg and /images/logo.svg are
different files.
Cache policy
Content-hashed files, such as /assets/app.9f3ac21.js, get a new URL when they
change, so they can use a long immutable policy. Frameworks set this for their
generated assets:
Files that keep the same URL across deployments, such as HTML, robots.txt,
favicon.ico, and anything in public/, need a policy that revalidates:
Don't put a long immutable policy on a stable URL. Visitors keep the old file and a CDN purge can't reach their browser. Set custom headers through your framework's configuration. See Caching.
Single-page apps
A client-rendered app needs a rewrite that serves /index.html for its routes.
Keep the fallback off asset paths, so /assets/missing.js still returns 404
instead of HTML. See Redirects and rewrites
and the Vite guide.
A request for a path that doesn't exist in the deployment returns 404 unless a
rewrite or fallback matches it.
Range requests
Easel doesn't serve partial content (206) for static deployment assets.
Range requests bypass the cache. Host video and other media that players seek
through in object storage.
Large and user-generated files
Deployment assets are read-only after the build and ship with every deployment. Store uploads, large downloads, and other content that changes independently of your code in object storage. Size limits are in Limits.