{
  "manifest": {
    "name": "css-minimizer-webpack-plugin",
    "version": "3.4.1",
    "description": "cssnano plugin for Webpack",
    "license": "MIT",
    "repository": {
      "type": "git",
      "url": "https://github.com/webpack-contrib/css-minimizer-webpack-plugin.git"
    },
    "author": {
      "name": "Loann Neveu"
    },
    "homepage": "https://github.com/webpack-contrib/css-minimizer-webpack-plugin",
    "bugs": {
      "url": "https://github.com/webpack-contrib/css-minimizer-webpack-plugin/issues"
    },
    "funding": {
      "type": "opencollective",
      "url": "https://opencollective.com/webpack"
    },
    "main": "dist/index.js",
    "types": "types/index.d.ts",
    "engines": {
      "node": ">= 12.13.0"
    },
    "scripts": {
      "start": "npm run build -- -w",
      "clean": "del-cli dist",
      "prebuild": "npm run clean types",
      "build:types": "tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write",
      "build:code": "cross-env NODE_ENV=production babel src -d dist --copy-files",
      "build": "npm-run-all -p \"build:**\"",
      "commitlint": "commitlint --from=master",
      "security": "npm audit",
      "lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css,ts}\" --list-different",
      "lint:js": "eslint --cache .",
      "lint:types": "tsc --pretty --noEmit",
      "lint": "npm-run-all -l -p \"lint:**\"",
      "test:only": "cross-env NODE_ENV=test jest",
      "test:watch": "npm run test:only -- --watch",
      "test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
      "pretest": "npm run lint",
      "test": "npm run test:coverage",
      "prepare": "husky install && npm run build",
      "release": "standard-version"
    },
    "files": [
      "dist",
      "types"
    ],
    "peerDependencies": {
      "webpack": "^5.0.0"
    },
    "peerDependenciesMeta": {
      "clean-css": {
        "optional": true
      },
      "csso": {
        "optional": true
      },
      "esbuild": {
        "optional": true
      },
      "@parcel/css": {
        "optional": true
      }
    },
    "dependencies": {
      "cssnano": "^5.0.6",
      "jest-worker": "^27.0.2",
      "postcss": "^8.3.5",
      "schema-utils": "^4.0.0",
      "serialize-javascript": "^6.0.0",
      "source-map": "^0.6.1"
    },
    "devDependencies": {
      "@babel/cli": "^7.16.7",
      "@babel/core": "^7.16.7",
      "@babel/preset-env": "^7.16.7",
      "@commitlint/cli": "^15.0.0",
      "@commitlint/config-conventional": "^15.0.0",
      "@parcel/css": "^1.0.3",
      "@types/clean-css": "^4.2.5",
      "@types/csso": "^5.0.0",
      "@types/serialize-javascript": "^5.0.2",
      "@webpack-contrib/eslint-config-webpack": "^3.0.0",
      "babel-jest": "^27.0.6",
      "clean-css": "^5.1.5",
      "copy-webpack-plugin": "^9.1.0",
      "cross-env": "^7.0.3",
      "css-loader": "^6.2.0",
      "cssnano-preset-simple": "^3.0.0",
      "csso": "^5.0.0",
      "del": "^6.0.0",
      "del-cli": "^4.0.0",
      "esbuild": "^0.14.10",
      "eslint": "^8.6.0",
      "eslint-config-prettier": "^8.3.0",
      "eslint-plugin-import": "^2.25.4",
      "husky": "^7.0.1",
      "jest": "^27.0.6",
      "lint-staged": "^12.1.5",
      "memfs": "^3.4.1",
      "mini-css-extract-plugin": "^2.2.0",
      "npm-run-all": "^4.1.5",
      "prettier": "^2.3.2",
      "sass": "^1.45.2",
      "sass-loader": "^12.1.0",
      "standard-version": "^9.3.0",
      "sugarss": "^4.0.1",
      "typescript": "^4.5.2",
      "webpack": "^5.50.0"
    },
    "keywords": [
      "cssnano",
      "css",
      "csso",
      "clean-css",
      "esbuild",
      "webpack",
      "webpack-plugin",
      "minimize",
      "minimizer",
      "minify",
      "minifier",
      "optimize",
      "optimizer"
    ],
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-css-minimizer-webpack-plugin-3.4.1-ab78f781ced9181992fe7b6e4f3422e76429878f-integrity/node_modules/css-minimizer-webpack-plugin/package.json",
    "readmeFilename": "README.md",
    "readme": "<div align=\"center\">\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\" src=\"https://webpack.js.org/assets/icon-square-big.svg\">\n  </a>\n</div>\n\n[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![deps][deps]][deps-url]\n[![tests][tests]][tests-url]\n[![cover][cover]][cover-url]\n[![chat][chat]][chat-url]\n[![size][size]][size-url]\n\n# css-minimizer-webpack-plugin\n\nThis plugin uses [cssnano](https://cssnano.co) to optimize and minify your CSS.\n\nJust like [optimize-css-assets-webpack-plugin](https://github.com/NMFR/optimize-css-assets-webpack-plugin) but more accurate with source maps and assets using query string, allows caching and works in parallel mode.\n\n## Getting Started\n\nTo begin, you'll need to install `css-minimizer-webpack-plugin`:\n\n```console\n$ npm install css-minimizer-webpack-plugin --save-dev\n```\n\nThen add the plugin to your `webpack` configuration. For example:\n\n**webpack.config.js**\n\n```js\nconst MiniCssExtractPlugin = require(\"mini-css-extract-plugin\");\nconst CssMinimizerPlugin = require(\"css-minimizer-webpack-plugin\");\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /.s?css$/,\n        use: [MiniCssExtractPlugin.loader, \"css-loader\", \"sass-loader\"],\n      },\n    ],\n  },\n  optimization: {\n    minimizer: [\n      // For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line\n      // `...`,\n      new CssMinimizerPlugin(),\n    ],\n  },\n  plugins: [new MiniCssExtractPlugin()],\n};\n```\n\nThis will enable CSS optimization only in production mode.\n\nIf you want to run it also in development set the `optimization.minimize` option to `true`:\n\n**webpack.config.js**\n\n```js\n// [...]\nmodule.exports = {\n  optimization: {\n    // [...]\n    minimize: true,\n  },\n};\n```\n\nAnd run `webpack` via your preferred method.\n\n## Note about source maps\n\n**Works only with `source-map`, `inline-source-map`, `hidden-source-map` and `nosources-source-map` values for the [`devtool`](https://webpack.js.org/configuration/devtool/) option.**\n\nWhy? Because CSS support only these source map types.\n\nThe plugin respect the [`devtool`](https://webpack.js.org/configuration/devtool/) and using the `SourceMapDevToolPlugin` plugin.\nUsing supported `devtool` values enable source map generation.\nUsing `SourceMapDevToolPlugin` with enabled the `columns` option enables source map generation.\n\nUse source maps to map error message locations to modules (this slows down the compilation).\nIf you use your own `minify` function please read the `minify` section for handling source maps correctly.\n\n## Options\n\n|                    Name                     |                      Type                      |              Default               | Description                                                             |\n| :-----------------------------------------: | :--------------------------------------------: | :--------------------------------: | :---------------------------------------------------------------------- |\n|             **[`test`](#test)**             |    `String\\|RegExp\\|Array<String\\|RegExp>`     |         `/\\.css(\\?.*)?$/i`         | Test to match files against.                                            |\n|          **[`include`](#include)**          |    `String\\|RegExp\\|Array<String\\|RegExp>`     |            `undefined`             | Files to include.                                                       |\n|          **[`exclude`](#exclude)**          |    `String\\|RegExp\\|Array<String\\|RegExp>`     |            `undefined`             | Files to exclude.                                                       |\n|         **[`parallel`](#parallel)**         |               `Boolean\\|Number`                |               `true`               | Enable/disable multi-process parallel running.                          |\n|           **[`minify`](#minify)**           |          `Function\\|Array<Function>`           | `CssMinimizerPlugin.cssnanoMinify` | Allows to override default minify function.                             |\n| **[`minimizerOptions`](#minimizeroptions)** |            `Object\\|Array<Object>`             |      `{ preset: 'default' }`       | Cssnano optimisations [options](https://cssnano.co/docs/optimisations). |\n|   **[`warningsFilter`](#warningsfilter)**   | `Function<(warning, file, source) -> Boolean>` |            `() => true`            | Allow to filter css-minimizer warnings.                                 |\n\n### `test`\n\nType: `String|RegExp|Array<String|RegExp>` - default: `/\\.css(\\?.*)?$/i`\n\nTest to match files against.\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        test: /\\.foo\\.css$/i,\n      }),\n    ],\n  },\n};\n```\n\n### `include`\n\nType: `String|RegExp|Array<String|RegExp>`\nDefault: `undefined`\n\nFiles to include.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        include: /\\/includes/,\n      }),\n    ],\n  },\n};\n```\n\n### `exclude`\n\nType: `String|RegExp|Array<String|RegExp>`\nDefault: `undefined`\n\nFiles to exclude.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        exclude: /\\/excludes/,\n      }),\n    ],\n  },\n};\n```\n\n### `parallel`\n\nType: `Boolean|Number`\nDefault: `true`\n\nUse multi-process parallel running to improve the build speed.\nDefault number of concurrent runs: `os.cpus().length - 1`.\n\n> ℹ️ Parallelization can speed up your build significantly and is therefore **highly recommended**.\n> If a parallelization is enabled, the packages in `minimizerOptions` must be required via strings (`packageName` or `require.resolve(packageName)`). Read more in [`minimizerOptions`](#minimizeroptions)\n\n#### `Boolean`\n\nEnable/disable multi-process parallel running.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        parallel: true,\n      }),\n    ],\n  },\n};\n```\n\n#### `Number`\n\nEnable multi-process parallel running and set number of concurrent runs.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        parallel: 4,\n      }),\n    ],\n  },\n};\n```\n\n### `minify`\n\nType: `Function|Array<Function>`\nDefault: `CssMinimizerPlugin.cssnanoMinify`\n\nAllows overriding default minify function.\nBy default, plugin uses [cssnano](https://github.com/cssnano/cssnano) package.\nUseful for using and testing unpublished versions or forks.\n\nPossible options:\n\n- CssMinimizerPlugin.cssnanoMinify\n- CssMinimizerPlugin.cssoMinify\n- CssMinimizerPlugin.cleanCssMinify\n- CssMinimizerPlugin.esbuildMinify\n- CssMinimizerPlugin.parcelCssMinify\n- `async (data, inputMap, minimizerOptions) => {return {code: \"a{color: red}\", map: \"...\", warnings: [], errors: []}}`\n\n> ⚠️ **Always use `require` inside `minify` function when `parallel` option enabled**.\n\n#### `Function`\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        minimizerOptions: {\n          level: {\n            1: {\n              roundingPrecision: \"all=3,px=5\",\n            },\n          },\n        },\n        minify: CssMinimizerPlugin.cleanCssMinify,\n      }),\n    ],\n  },\n};\n```\n\n#### `Array`\n\nIf an array of functions is passed to the `minify` option, the `minimizerOptions` must also be an array.\nThe function index in the `minify` array corresponds to the options object with the same index in the `minimizerOptions` array.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        minimizerOptions: [\n          {}, // Options for the first function (CssMinimizerPlugin.cssnanoMinify)\n          {}, // Options for the second function (CssMinimizerPlugin.cleanCssMinify)\n          {}, // Options for the third function\n        ],\n        minify: [\n          CssMinimizerPlugin.cssnanoMinify,\n          CssMinimizerPlugin.cleanCssMinify,\n          async (data, inputMap, minimizerOptions) => {\n            // To do something\n            return {\n              code: `a{color: red}`,\n              map: `{\"version\": \"3\", ...}`,\n              warnings: [],\n              errors: [],\n            };\n          },\n        ],\n      }),\n    ],\n  },\n};\n```\n\n### `minimizerOptions`\n\nType: `Object|Array<Object>`\nDefault: `{ preset: 'default' }`\n\nCssnano optimisations [options](https://cssnano.co/docs/optimisations).\n\n#### `Object`\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        minimizerOptions: {\n          preset: [\n            \"default\",\n            {\n              discardComments: { removeAll: true },\n            },\n          ],\n        },\n      }),\n    ],\n  },\n};\n```\n\n#### `Array`\n\nThe function index in the `minify` array corresponds to the options object with the same index in the `minimizerOptions` array.\nIf you use `minimizerOptions` like object, all `minify` function accept it.\n\n> If a parallelization is enabled, the packages in `minimizerOptions` must be required via strings (`packageName` or `require.resolve(packageName)`). In this case, we shouldn't use `require`/`import`.\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        minimizerOptions: {\n          preset: require.resolve(\"cssnano-preset-simple\"),\n        },\n      }),\n    ],\n  },\n};\n```\n\n##### `processorOptions` (⚠ only cssnano)\n\nType: `Object`\nDefault: `{ from: assetName }`\n\nAllows filtering options [`processoptions`](https://postcss.org/api/#processoptions) for the cssnano.\nThe `parser`,` stringifier` and `syntax` can be either a function or a string indicating the module that will be imported.\n\n> ⚠️ **If a function is passed, the `parallel` option must be disabled.**.\n\n```js\nimport sugarss from \"sugarss\";\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        parallel: false,\n        minimizerOptions: {\n          processorOptions: {\n            parser: sugarss,\n          },\n        },\n      }),\n    ],\n  },\n};\n```\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        minimizerOptions: {\n          processorOptions: {\n            parser: \"sugarss\",\n          },\n        },\n      }),\n    ],\n  },\n};\n```\n\n### `warningsFilter`\n\nType: `Function<(warning, file, source) -> Boolean>`\nDefault: `() => true`\n\nAllow filtering css-minimizer warnings (By default [cssnano](https://github.com/cssnano/cssnano)).\nReturn `true` to keep the warning, a falsy value (`false`/`null`/`undefined`) otherwise.\n\n> ⚠️ The `source` argument will contain `undefined` if you don't use source maps.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        warningsFilter: (warning, file, source) => {\n          if (/Dropping unreachable code/i.test(warning)) {\n            return true;\n          }\n\n          if (/file\\.css/i.test(file)) {\n            return true;\n          }\n\n          if (/source\\.css/i.test(source)) {\n            return true;\n          }\n\n          return false;\n        },\n      }),\n    ],\n  },\n};\n```\n\n## Examples\n\n### Use sourcemaps\n\nDon't forget to enable `sourceMap` options for all loaders.\n\n```js\nconst CssMinimizerPlugin = require(\"css-minimizer-webpack-plugin\");\n\nmodule.exports = {\n  devtool: \"source-map\",\n  module: {\n    rules: [\n      {\n        test: /.s?css$/,\n        use: [\n          MiniCssExtractPlugin.loader,\n          { loader: \"css-loader\", options: { sourceMap: true } },\n          { loader: \"sass-loader\", options: { sourceMap: true } },\n        ],\n      },\n    ],\n  },\n  optimization: {\n    minimizer: [new CssMinimizerPlugin()],\n  },\n  plugins: [new MiniCssExtractPlugin()],\n};\n```\n\n### Remove all comments\n\nRemove all comments (including comments starting with `/*!`).\n\n```js\nmodule.exports = {\n  optimization: {\n    minimizer: [\n      new CssMinimizerPlugin({\n        minimizerOptions: {\n          preset: [\n            \"default\",\n            {\n              discardComments: { removeAll: true },\n            },\n          ],\n        },\n      }),\n    ],\n  },\n};\n```\n\n### Using custom minifier [csso](https://github.com/css/csso)\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // Uncomment if you need source maps\n  // devtool: \"source-map\",\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        minify: CssMinimizerPlugin.cssoMinify,\n        // Uncomment this line for options\n        // minimizerOptions: { restructure: false },\n      }),\n    ],\n  },\n};\n```\n\n### Using custom minifier [clean-css](https://github.com/jakubpawlowicz/clean-css)\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // Uncomment if you need source maps\n  // devtool: \"source-map\",\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        minify: CssMinimizerPlugin.cleanCssMinify,\n        // Uncomment this line for options\n        // minimizerOptions: { compatibility: 'ie11,-properties.merging' },\n      }),\n    ],\n  },\n};\n```\n\n### Using custom minifier [esbuild](https://github.com/evanw/esbuild)\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // Uncomment if you need source maps\n  // devtool: \"source-map\",\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        minify: CssMinimizerPlugin.esbuildMinify,\n      }),\n    ],\n  },\n};\n```\n\n### Using custom minifier [@parcel/css](https://github.com/parcel-bundler/parcel-css)\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // Uncomment if you need source maps\n  // devtool: \"source-map\",\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new CssMinimizerPlugin({\n        minify: CssMinimizerPlugin.parcelCssMinify,\n        // Uncomment this line for options\n        // minimizerOptions: { targets: { ie: 11 }, drafts: { nesting: true } },\n      }),\n    ],\n  },\n};\n```\n\n## Contributing\n\nPlease take a moment to read our contributing guidelines if you haven't yet done so.\n\n[CONTRIBUTING](./.github/CONTRIBUTING.md)\n\n## License\n\n[MIT](./LICENSE)\n\n[npm]: https://img.shields.io/npm/v/css-minimizer-webpack-plugin.svg\n[npm-url]: https://npmjs.com/package/css-minimizer-webpack-plugin\n[node]: https://img.shields.io/node/v/css-minimizer-webpack-plugin.svg\n[node-url]: https://nodejs.org\n[deps]: https://david-dm.org/webpack-contrib/css-minimizer-webpack-plugin.svg\n[deps-url]: https://david-dm.org/webpack-contrib/css-minimizer-webpack-plugin\n[tests]: https://github.com/webpack-contrib/css-minimizer-webpack-plugin/workflows/css-minimizer-webpack-plugin/badge.svg\n[tests-url]: https://github.com/webpack-contrib/css-minimizer-webpack-plugin/actions\n[cover]: https://codecov.io/gh/webpack-contrib/css-minimizer-webpack-plugin/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/css-minimizer-webpack-plugin\n[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg\n[chat-url]: https://gitter.im/webpack/webpack\n[size]: https://packagephobia.now.sh/badge?p=css-minimizer-webpack-plugin\n[size-url]: https://packagephobia.now.sh/result?p=css-minimizer-webpack-plugin\n",
    "licenseText": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.4.1.tgz#ab78f781ced9181992fe7b6e4f3422e76429878f",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.4.1.tgz",
    "hash": "ab78f781ced9181992fe7b6e4f3422e76429878f",
    "integrity": "sha512-1u6D71zeIfgngN2XNRJefc/hY7Ybsxd74Jm4qngIXyUEk7fss3VUzuHxLAq/R8NAba4QU9OUSaMZlbpRc7bM4Q==",
    "registry": "npm",
    "packageName": "css-minimizer-webpack-plugin",
    "cacheIntegrity": "sha512-1u6D71zeIfgngN2XNRJefc/hY7Ybsxd74Jm4qngIXyUEk7fss3VUzuHxLAq/R8NAba4QU9OUSaMZlbpRc7bM4Q== sha1-q3j3gc7ZGBmS/ntuTzQi52Qph48="
  },
  "registry": "npm",
  "hash": "ab78f781ced9181992fe7b6e4f3422e76429878f"
}