45 lines
1.5 KiB
JSON
45 lines
1.5 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "Bundle Budgets Config",
|
|
"description": "Per-route, per-vendor and per-lazy-runtime gzip-size budgets used by scripts/verify-bundle-size.mjs.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["default", "routes", "vendorChunks", "lazyRuntimeChunks"],
|
|
"properties": {
|
|
"$schema": { "type": "string" },
|
|
"comment": { "type": "string" },
|
|
"default": { "$ref": "#/definitions/budget" },
|
|
"routes": {
|
|
"type": "object",
|
|
"additionalProperties": { "$ref": "#/definitions/budget" }
|
|
},
|
|
"vendorChunks": {
|
|
"type": "object",
|
|
"additionalProperties": { "$ref": "#/definitions/budget" }
|
|
},
|
|
"lazyRuntimeChunks": {
|
|
"type": "object",
|
|
"additionalProperties": { "$ref": "#/definitions/budget" }
|
|
}
|
|
},
|
|
"definitions": {
|
|
"budget": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["limitKb", "warningKb"],
|
|
"properties": {
|
|
"limitKb": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"description": "Hard limit in kilobytes (gzip). Above this the route is flagged as exceeding budget; CI emits a warning comment but does not fail."
|
|
},
|
|
"warningKb": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"description": "Warning threshold in kilobytes (gzip). Above this and at-or-below limitKb, route is flagged as approaching budget."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|