
Configuring Webapp Metadata
- 4 installs
- 787 repo stars
- Updated August 5, 2026
- forcedotcom/afv-library
Configures Salesforce WebApplication metadata, the webapplication.json file, bundle layout, meta XML, and build output directory.
About
Documents WebApplication bundle rules including folder layout, matching meta XML filename, build output directory, and webapplication.json settings. A developer uses it when configuring a Salesforce web app bundle's metadata structure.
- Bundle must live under webapplications/<AppName>/ with matching meta XML
- Build output defaults to dist/ unless overridden by webapplication.json.outputDir
Configuring Webapp Metadata by the numbers
- 4 all-time installs (skills.sh)
- Ranked #1,101 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/forcedotcom/afv-library --skill configuring-webapp-metadataAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 4 |
|---|---|
| repo stars | ★ 787 |
| Last updated | August 5, 2026 |
| Repository | forcedotcom/afv-library ↗ |
What it does
Configures Salesforce WebApplication metadata, the webapplication.json file, bundle layout, meta XML, and build output directory.
Files
WebApplication Requirements
Bundle Rules
- A WebApplication bundle must live under
webapplications/<AppName>/ - The bundle must contain
<AppName>.webapplication-meta.xml - The metadata filename must exactly match the folder name
- A build output directory must exist and contain at least one file
- Default build output directory:
dist/ - If
webapplication.json.outputDiris set, it overridesdist/
Valid example:
webapplications/
MyApp/
MyApp.webapplication-meta.xml
webapplication.json
dist/
index.htmlMetadata XML
Required fields:
masterLabelversion(max 20 chars)isActive(boolean)
Optional fields:
description(max 255 chars)
webapplication.json
webapplication.json is optional.
Allowed top-level keys only:
outputDirroutingheaders
File Constraints
- Must be valid UTF-8 JSON
- Max size: 100 KB
- Root must be a non-empty object
- Never allow
{}, arrays, or primitives as the root
Path Safety
Applies to:
outputDirrouting.fallback
Reject:
- backslashes
- leading
/or\ ..segments- null or control characters
- globs:
*,?,** %
All resolved paths must stay within the application bundle.
outputDir
- Must be a non-empty string
- Must reference a subdirectory only
- Reject
.and./ - The directory must exist in the bundle
- The directory must contain at least one file
routing
- If present, must be a non-empty object
- Allowed keys only:
rewritesredirectsfallbacktrailingSlashfileBasedRouting
routing.trailingSlash
- Must be one of:
"always","never","auto"
routing.fileBasedRouting
- Must be a boolean
routing.fallback
- Must be a non-empty string
- Must satisfy Path Safety rules
- Target file must exist
routing.rewrites
- Must be a non-empty array
- Each item must be a non-empty object
- Allowed keys:
route,rewrite rewritemust be a non-empty stringroute, if present, must be a non-empty string
Example:
{
"routing": {
"rewrites": [
{ "route": "/app/:path*", "rewrite": "/index.html" }
]
}
}routing.redirects
- Must be a non-empty array
- Each item must be a non-empty object
- Allowed keys:
route,redirect,statusCode redirectmust be a non-empty stringroute, if present, must be a non-empty stringstatusCode, if present, must be one of:301,302,307,308
Example:
{
"routing": {
"redirects": [
{ "route": "/old-page", "redirect": "/new-page", "statusCode": 301 }
]
}
}headers
- If present, must be a non-empty array
- Each item must be a non-empty object
- Allowed keys:
source,headers headersmust be a non-empty array
Each header entry must contain:
key: non-empty stringvalue: non-empty string
Example:
{
"headers": [
{
"source": "/assets/**",
"headers": [
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
]
}
]
}Never Suggest
{}as the JSON root"routing": {}- empty arrays
- empty array items such as
[{}] "outputDir": ".""outputDir": "./"