{
  "$id": "https://json.schemastore.org/size-limit.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "default": [],
  "items": {
    "title": "Configuration Section",
    "allOf": [
      {
        "type": "object",
        "properties": {
          "path": {
            "oneOf": [
              {
                "title": "relative path to files",
                "type": "string",
                "pattern": "^/?([^/]+/)*[^/]+/?$",
                "default": ""
              },
              {
                "title": "relative paths to files",
                "type": "array",
                "items": {
                  "title": "Path or Glob Pattern",
                  "type": "string",
                  "pattern": "^/?([^/]+/)*[^/]+/?$",
                  "default": ""
                },
                "uniqueItems": true
              }
            ]
          },
          "import": {
            "title": "partial import to test tree-shaking",
            "oneOf": [
              {
                "type": "string",
                "default": ""
              },
              {
                "type": "object",
                "patternProperties": {
                  "^/?([^/]+/)*[^/]+/?$": {
                    "type": "string",
                    "default": ""
                  }
                },
                "additionalProperties": false,
                "default": {}
              }
            ],
            "default": ""
          },
          "limit": {
            "title": "size or time limit for files from the path option. It should be a string with a number and unit, separated by a space.",
            "type": "string",
            "pattern": "\\d+( ?(ms|s)|\\s*(B|kB|[MGTPEZY]i?B|KiB))",
            "default": ""
          },
          "name": {
            "title": "the name of the current section. It will only be useful if you have multiple sections.",
            "type": "string",
            "default": ""
          },
          "entry": {
            "title": "when using a custom webpack config, a webpack entry could be given. It could be a string or an array of strings. By default, the total size of all entry points will be checked.",
            "oneOf": [
              {
                "type": "string",
                "default": ""
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true,
                "default": []
              }
            ],
            "default": ""
          },
          "webpack": {
            "title": "with false it will disable webpack.",
            "type": "boolean",
            "default": false
          },
          "running": {
            "title": "with false it will disable calculating running time.",
            "type": "boolean",
            "default": true
          },
          "gzip": {
            "title": "with false it will disable gzip compression.",
            "type": "boolean",
            "default": true
          },
          "brotli": {
            "title": "with true it will use brotli compression and disable gzip compression.",
            "type": "boolean",
            "default": false
          },
          "ignore": {
            "type": "array",
            "items": {
              "title": "an array of files and dependencies to exclude from the project size calculation.",
              "type": "string",
              "pattern": "^/?([^/]+/)*[^/]+/?$"
            },
            "uniqueItems": true,
            "default": []
          }
        },
        "required": ["path"],
        "default": {}
      },
      {
        "if": {
          "not": {
            "properties": {
              "webpack": {
                "type": "boolean",
                "enum": [false]
              }
            }
          }
        },
        "then": {
          "properties": {
            "config": {
              "title": "a path to a custom webpack config.",
              "type": "string",
              "pattern": "^/?([^/]+/)*[^/]+/?$",
              "default": "webpack.config.js"
            }
          }
        }
      }
    ]
  },
  "title": "JSON Schema for configuration for size-limit",
  "type": "array",
  "uniqueItems": true
}