{"id":21240245,"url":"https://github.com/retyui/clean-css-loader","last_synced_at":"2025-07-10T19:33:07.574Z","repository":{"id":46830704,"uuid":"50417151","full_name":"retyui/clean-css-loader","owner":"retyui","description":"CleanCSS loader module for webpack ","archived":false,"fork":false,"pushed_at":"2023-01-08T12:50:47.000Z","size":481,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-28T22:50:03.100Z","etag":null,"topics":["clean-css","loader","minify-css","webpack","webpack-loader"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/retyui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-26T09:10:39.000Z","updated_at":"2023-08-03T16:50:18.000Z","dependencies_parsed_at":"2023-02-08T06:01:20.543Z","dependency_job_id":null,"html_url":"https://github.com/retyui/clean-css-loader","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retyui%2Fclean-css-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retyui%2Fclean-css-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retyui%2Fclean-css-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retyui%2Fclean-css-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retyui","download_url":"https://codeload.github.com/retyui/clean-css-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225653796,"owners_count":17502940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean-css","loader","minify-css","webpack","webpack-loader"],"created_at":"2024-11-21T00:50:07.858Z","updated_at":"2024-11-21T00:50:08.561Z","avatar_url":"https://github.com/retyui.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://cdn.rawgit.com/jakubpawlowicz/clean-css/master/logo.v2.svg\" alt=\"clean-css logo\" width=\"400\"/\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://github.com/webpack/webpack\"\u003e\n        \u003cimg width=\"200\" height=\"200\" src=\"https://webpack.js.org/assets/icon-square-big.svg\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\nA [clean-css](https://github.com/jakubpawlowicz/clean-css) loader for [webpack](https://github.com/webpack/webpack).\n\n# clean-css-loader\n\n[![npm](https://img.shields.io/npm/v/clean-css-loader.svg)](https://www.npmjs.com/package/clean-css-loader)\n[![CI](https://github.com/retyui/clean-css-loader/actions/workflows/nodejs.yml/badge.svg)](https://github.com/retyui/clean-css-loader/actions/workflows/nodejs.yml)\n[![clean-css-loader install size](https://packagephobia.com/badge?p=clean-css-loader)](https://packagephobia.com/result?p=clean-css-loader)\n[![npm clean-css-loader](https://img.shields.io/npm/dm/clean-css-loader.svg)](https://www.npmjs.com/package/clean-css-loader)\n\n## Getting Started\n\nTo begin, you'll need to install clean-css-loader:\n\n```bash\nyarn add -D clean-css-loader\n```\n\nThen add the plugin to your webpack config. For example:\n\n```tsx\n// webpack.config.js\nconst isProduction = process.env.NODE_ENV === \"production\";\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.css$/,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"clean-css-loader\",\n            options: {\n              // Loader options\n              disable: !isProduction,\n              skipWarn: false,\n\n              // CleasCSS options\n              compatibility: \"ie9\",\n              level: 2,\n              inline: [\"remote\"],\n              //...\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\nOr using plugin [inline](https://webpack.js.org/concepts/loaders/#inline):\n\n```tsx\n// default\nimport \"style-loader!css-loader!clean-css-loader!./style.css\";\n// with options (query params)\nimport \"style-loader!css-loader!clean-css-loader?level=2\u0026skipWarn=true!./style.css\";\n// with options (options as JSON)\nimport \"style-loader!css-loader!clean-css-loader?{\\\"skipWarn\\\": true,\\\"level\\\":2}!./style.css\";\n```\n\n## Options\n\n#### `disable: boolean`\n\nThis option enables/disables minify, useful to easily disable on development mode (default: `false`)\n\n#### `skipWarn: boolean`\n\nThis option enables/disables output warnings (default: `false`)\n\n#### `sourceMap: boolean`\n\nEnables/Disables generation of source maps. (default: `compiler.devtool`)\n\n## `CleanCSS` module options\n\n- [clean-css/clean-css#constructor-options](https://github.com/jakubpawlowicz/clean-css#constructor-options)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretyui%2Fclean-css-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretyui%2Fclean-css-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretyui%2Fclean-css-loader/lists"}