{
  "definitions": {
    "Rule": {
      "description": "Filtering rule as regex or string.",
      "anyOf": [
        {
          "instanceof": "RegExp",
          "tsType": "RegExp"
        },
        {
          "type": "string",
          "minLength": 1
        }
      ]
    },
    "Rules": {
      "description": "Filtering rules.",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "description": "A rule condition.",
            "oneOf": [
              {
                "$ref": "#/definitions/Rule"
              }
            ]
          }
        },
        {
          "$ref": "#/definitions/Rule"
        }
      ]
    }
  },
  "title": "MinimizerPluginOptions",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "test": {
      "description": "Include all modules that pass test assertion.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#test",
      "oneOf": [
        {
          "$ref": "#/definitions/Rules"
        }
      ]
    },
    "include": {
      "description": "Include all modules matching any of these conditions.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#include",
      "oneOf": [
        {
          "$ref": "#/definitions/Rules"
        }
      ]
    },
    "exclude": {
      "description": "Exclude all modules matching any of these conditions.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#exclude",
      "oneOf": [
        {
          "$ref": "#/definitions/Rules"
        }
      ]
    },
    "minimizerOptions": {
      "description": "Deprecated way of giving a `minify` minimizer its options, to be removed in the next major release. Prefer a minimizer's own `options`.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#minimizeroptions",
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "array",
          "minItems": 1,
          "items": {
            "additionalProperties": true,
            "type": "object"
          }
        }
      ]
    },
    "terserOptions": {
      "description": "Deprecated alias for `minimizerOptions`. Options for `terser` (by default) or custom `minify` function.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#terseroptions",
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "array",
          "minItems": 1,
          "items": {
            "additionalProperties": true,
            "type": "object"
          }
        }
      ]
    },
    "extractComments": {
      "description": "Whether comments shall be extracted to a separate file.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#extractcomments",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string",
          "minLength": 1
        },
        {
          "instanceof": "RegExp"
        },
        {
          "instanceof": "Function"
        },
        {
          "additionalProperties": false,
          "properties": {
            "condition": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "instanceof": "RegExp"
                },
                {
                  "instanceof": "Function"
                }
              ],
              "description": "Condition what comments you need extract.",
              "link": "https://github.com/webpack/minimizer-webpack-plugin#condition"
            },
            "filename": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "instanceof": "Function"
                }
              ],
              "description": "The file where the extracted comments will be stored. Default is to append the suffix .LICENSE.txt to the original filename.",
              "link": "https://github.com/webpack/minimizer-webpack-plugin#filename"
            },
            "banner": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "instanceof": "Function"
                }
              ],
              "description": "The banner text that points to the extracted file and will be added on top of the original file",
              "link": "https://github.com/webpack/minimizer-webpack-plugin#banner"
            }
          },
          "type": "object"
        }
      ]
    },
    "parallel": {
      "description": "Use multi-process parallel running to improve the build speed.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#parallel",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "integer"
        }
      ]
    },
    "minify": {
      "description": "Allows you to override default minify function. Written as an object it states how to run one minimizer, options included. An empty array is no minimizers at all, for an instance whose whole job is its `generate`.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#number",
      "anyOf": [
        {
          "instanceof": "Function"
        },
        {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "instanceof": "Function"
              },
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "implementation": {
                    "description": "The minimizer itself.",
                    "instanceof": "Function"
                  },
                  "options": {
                    "description": "Options for this minimizer. Preferred over `minimizerOptions`, which is deprecated; setting both for one minimizer is an error.",
                    "type": "object",
                    "additionalProperties": true
                  },
                  "filter": {
                    "description": "Which assets this minimizer is offered, decided by name and info. Overrides a `filter` on the minimizer function itself.",
                    "instanceof": "Function"
                  }
                },
                "required": ["implementation"]
              }
            ]
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "implementation": {
              "description": "The minimizer itself.",
              "instanceof": "Function"
            },
            "options": {
              "description": "Options for this minimizer. Preferred over `minimizerOptions`, which is deprecated; setting both for one minimizer is an error.",
              "type": "object",
              "additionalProperties": true
            },
            "filter": {
              "description": "Which assets this minimizer is offered, decided by name and info. Overrides a `filter` on the minimizer function itself.",
              "instanceof": "Function"
            }
          },
          "required": ["implementation"]
        }
      ]
    },
    "generate": {
      "description": "Rewrites a module's own bytes as it is built, which is what lets it be re-encoded into another format and renamed. Written as an object it states how to run one generator; written as an object of them it names its generators, and an asset asks for one by name with `?as=`.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#generate",
      "anyOf": [
        {
          "instanceof": "Function"
        },
        {
          "type": "array",
          "minItems": 1,
          "items": {
            "instanceof": "Function"
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "implementation": {
              "description": "The generator itself.",
              "instanceof": "Function"
            },
            "options": {
              "description": "Options for this generator. Preferred over `generatorOptions`, which is deprecated; setting both for one generator is an error.",
              "type": "object",
              "additionalProperties": true
            },
            "type": {
              "description": "`import` re-encodes a module as it is built, so the import that asked for it is renamed with it. `asset` generates a new asset beside an emitted one, which nothing has to import.",
              "enum": ["import", "asset"]
            },
            "filename": {
              "description": "Name for the generated asset, as a webpack filename template, or a function answering with one. `asset` generators only; by default the generator's own name for it is used.",
              "anyOf": [
                { "type": "string", "minLength": 1 },
                { "instanceof": "Function" }
              ]
            },
            "filter": {
              "description": "Decides per asset whether to generate from it, on top of `test`/`include`/`exclude`.",
              "instanceof": "Function"
            },
            "deleteOriginalAssets": {
              "description": "Removes the asset generated from, its own file alone — whatever its `related` names stays. Written as a function it is asked per asset. `asset` generators only.",
              "anyOf": [{ "type": "boolean" }, { "instanceof": "Function" }]
            },
            "threshold": {
              "description": "Generate only from assets larger than this, in bytes. `asset` generators only.",
              "type": "number",
              "minimum": 0
            },
            "minRatio": {
              "description": "Keep the generated asset only when it is this much smaller than the one it was read from, as `generated size / original size`. `asset` generators only.",
              "type": "number",
              "exclusiveMinimum": 0
            },
            "relatedName": {
              "description": "The key the generated asset is recorded under in the original's `related` info, which is how a server finds it. `false` records nothing. `asset` generators only.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "enum": [false]
                }
              ]
            }
          },
          "required": ["implementation"]
        },
        {
          "type": "object",
          "minProperties": 1,
          "additionalProperties": {
            "anyOf": [
              {
                "instanceof": "Function"
              },
              {
                "type": "array",
                "minItems": 1,
                "items": {
                  "instanceof": "Function"
                }
              },
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "implementation": {
                    "description": "The generator itself.",
                    "instanceof": "Function"
                  },
                  "options": {
                    "description": "Options for this generator. Preferred over `generatorOptions`, which is deprecated; setting both for one generator is an error.",
                    "type": "object",
                    "additionalProperties": true
                  },
                  "type": {
                    "description": "`import` re-encodes a module as it is built, so the import that asked for it is renamed with it. `asset` generates a new asset beside an emitted one, which nothing has to import.",
                    "enum": ["import", "asset"]
                  },
                  "filename": {
                    "description": "Name for the generated asset, as a webpack filename template, or a function answering with one. `asset` generators only; by default the generator's own name for it is used.",
                    "anyOf": [
                      { "type": "string", "minLength": 1 },
                      { "instanceof": "Function" }
                    ]
                  },
                  "filter": {
                    "description": "Decides per asset whether to generate from it, on top of `test`/`include`/`exclude`.",
                    "instanceof": "Function"
                  },
                  "deleteOriginalAssets": {
                    "description": "Removes the asset generated from, its own file alone — whatever its `related` names stays. Written as a function it is asked per asset. `asset` generators only.",
                    "anyOf": [
                      { "type": "boolean" },
                      { "instanceof": "Function" }
                    ]
                  },
                  "threshold": {
                    "description": "Generate only from assets larger than this, in bytes. `asset` generators only.",
                    "type": "number",
                    "minimum": 0
                  },
                  "minRatio": {
                    "description": "Keep the generated asset only when it is this much smaller than the one it was read from, as `generated size / original size`. `asset` generators only.",
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "relatedName": {
                    "description": "The key the generated asset is recorded under in the original's `related` info, which is how a server finds it. `false` records nothing. `asset` generators only.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "enum": [false]
                      }
                    ]
                  }
                },
                "required": ["implementation"]
              }
            ]
          }
        }
      ]
    },
    "generatorOptions": {
      "description": "Deprecated way of giving a `generate` generator its options, to be removed in the next major release. Prefer a generator's own `options`. Keyed by name where `generate` names its generators.",
      "link": "https://github.com/webpack/minimizer-webpack-plugin#generatoroptions",
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "array",
          "minItems": 1,
          "items": {
            "additionalProperties": true,
            "type": "object"
          }
        }
      ]
    }
  }
}
