Assets
The assets key names one directory whose files are published to the edge, and the build decides the rest.
assets is a single directory path, relative to the project root. Every regular file inside it is uploaded during the deployment and served from the edge, with no invocation involved.
Naming the directory
version: 4
assets: publicThe directory is walked recursively, and each file is served at its path with the directory prefix removed. public/css/app.css becomes /css/app.css, and public/index.html becomes /index.html. Recursion stops at 100 levels deep, which is there to survive a symlink loop rather than to limit you.
Set assets: "." to publish the project root itself. That is the whole configuration a folder of HTML needs, and it is exactly what the platform generates for a project with no config file and no framework.
There is one assets key, so one directory. A build that produces two output directories needs the second one moved or copied into the first by the build itself.
What never gets published
Some files are dropped even though they sit inside the directory:
- Any file that a
functionspattern also matches. Apublic/index.phpyou declared as a Function is not additionally served as a static file. - Anything ending in
.htaccessor.htpasswd, matched without regard to case. - Any file whose path is used verbatim as a route
source. node_modules/,vendor/,package.json,package-lock.json,pnpm-lock.yaml,.gitignore,.git/,.github/, and the config file itself. These are matched at the project root, so they bite onassets: "."and leave apublic/node_modulesalone.
A symlinked file is the one case that is not quietly dropped. The deployment fails on it with Static asset file must not be a symlink and the path, so copy the file in rather than linking to it. Symlinked directories are walked through as normal.
Content types are derived from the file extension at upload time, falling back to application/octet-stream. Static assets covers how the edge then serves them, including range requests, conditional requests, and cache lifetimes.
populateAssetCache
The populateAssetCache key is accepted for compatibility with older files, and nothing reads it. Whether the CDN cache is warmed after a deployment is the platform's decision, and setting the key changes nothing either way.
What framework detection adds
A detected framework describes its output more precisely than a directory name can. Its generated configuration can publish several directories at once, each under its own URL prefix, and can set the content type or the served path of an individual file. None of that has a gigadrive.yaml equivalent: what you write by hand is one assets directory, served as the files inside it.
