{"id":20937979,"url":"https://github.com/zoobestik/csso-webpack-plugin","last_synced_at":"2025-04-06T08:15:21.859Z","repository":{"id":53193301,"uuid":"84099752","full_name":"zoobestik/csso-webpack-plugin","owner":"zoobestik","description":"CSSO full restructuring minification files to serve your webpack bundles","archived":false,"fork":false,"pushed_at":"2021-04-09T19:02:23.000Z","size":390,"stargazers_count":107,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-03-30T07:10:06.235Z","etag":null,"topics":["compress","css","csso","minify","optimization","webpack"],"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/zoobestik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-06T17:09:38.000Z","updated_at":"2024-09-09T18:54:04.000Z","dependencies_parsed_at":"2022-09-01T04:23:07.344Z","dependency_job_id":null,"html_url":"https://github.com/zoobestik/csso-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoobestik%2Fcsso-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoobestik%2Fcsso-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoobestik%2Fcsso-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoobestik%2Fcsso-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoobestik","download_url":"https://codeload.github.com/zoobestik/csso-webpack-plugin/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451667,"owners_count":20940944,"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":["compress","css","csso","minify","optimization","webpack"],"created_at":"2024-11-18T22:47:03.814Z","updated_at":"2025-04-06T08:15:21.833Z","avatar_url":"https://github.com/zoobestik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSSO Webpack Plugin\n[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![dependencies](https://img.shields.io/david/zoobestik/csso-webpack-plugin.svg)](https://david-dm.org/zoobestik/csso-webpack-plugin)\n[![status](https://travis-ci.org/zoobestik/csso-webpack-plugin.svg?branch=master)](https://travis-ci.org/zoobestik/csso-webpack-plugin)\n[![downloads](https://img.shields.io/npm/dm/csso-webpack-plugin.svg)](http://npm-stats.com/~packages/csso-webpack-plugin)\n\n\u003cimg src=\"https://rawgithub.com/zoobestik/csso-webpack-plugin/dev/docs/img/logo.jpg\" width=\"195\" alt=\"Logo\"\u003e\n\n **Why is not [csso-loader](https://www.npmjs.com/package/csso-loader) or [postcss-csso](https://github.com/lahmatiy/postcss-csso)?**\n * **[Full restructuring](https://rawgithub.com/zoobestik/csso-webpack-plugin/dev/docs/img/better-full.svg)** in bundles:\n ![better](https://rawgithub.com/zoobestik/csso-webpack-plugin/dev/docs/img/better.svg)\n \n * No problems with custom syntax like **css-modules** – `:global(.c .d) .a { color: #fff; }`\n   \u003cimg src=\"https://rawgithub.com/zoobestik/csso-webpack-plugin/dev/docs/img/css-modules.png\" width=\"320\" alt=\"syntax\"\u003e\n \n * Possible to generate both **pure and minimized** versions [at the same time](#options).\n\n## Install\n```bash\nnpm i -D csso-webpack-plugin\n```\n\nFor **`node` \u003c 8.0.0** use [1.x](https://github.com/zoobestik/csso-webpack-plugin/tree/v1) version with `csso@^3`:\n```bash\nnpm i -D csso-webpack-plugin@1\n```\n\n## Usage\nPlugin good to use in pair with [ExtractTextPlugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) or [MiniCssExtractPlugin](https://github.com/webpack-contrib/mini-css-extract-plugin).\n```js\nconst CssoWebpackPlugin = require('csso-webpack-plugin').default;\n\nmodule.exports = {\n  module: { /* ... */ },\n  plugins: [\n    new MiniCssExtractPlugin({\n      filename: \"[name].css\",\n      chunkFilename: \"[id].css\"\n    }),\n    new CssoWebpackPlugin(),\n  ]\n}\n```\n\n## Options\n\n```js\nnew CssoWebpackPlugin([options: CssoOptions], [filter: function | RegExp])\n```\n\nArguments:\n* `options` — [csso options](https://github.com/css/csso#minifysource-options).\n* `options.pluginOutputPostfix` — *function(file)* or *string postfix*, if passed, plugin will create two assets vanilla and compressed.\n   Example:\n   ```javascript\n   {\n       plugins: [\n           new ExtractTextPlugin('test.css'),\n           new CssoWebpackPlugin({ pluginOutputPostfix: 'min' })\n           /* Generated:\n               test.css — uncompressed file\n               test.min.css — minimized with csso file\n           */\n       ]\n   }\n   ```\n* `filter` — Detect should be file processed. Defaults: *to ends with `.css`*.\n\n## Flow support\nI don't now why, but plugin ships with flow typings (*typedef too*). To use them in your project, add this to the `[libs]` section of your `.flowconfig`:\n```\n[libs]\nnode_modules/csso-webpack-plugin/lib/index.js.flow\n```\n\n## Acknowledgements\n[![Develop By](https://img.shields.io/badge/develop%20by-zoobestik-blue.svg?style=flat)](https://ru.linkedin.com/in/kbchernenko) [![Logo By](https://img.shields.io/badge/logo%20by-@egorii-yellow.svg?style=flat)](https://www.linkedin.com/in/%D0%B5%D0%B3%D0%BE%D1%80-%D0%B0%D0%BB%D0%B5%D0%BA%D1%81%D0%B5%D0%B5%D0%B2-968a1265/) [![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n\n[npm]: https://img.shields.io/npm/v/csso-webpack-plugin.svg\n[npm-url]: https://npmjs.com/package/csso-webpack-plugin\n\n[node]: https://img.shields.io/node/v/csso-webpack-plugin.svg\n[node-url]: https://nodejs.org\n\n[deps]: https://david-dm.org/zoobestik/csso-webpack-plugin.svg\n[deps-url]: https://david-dm.org/zoobestik/csso-webpack-plugin\n\n[tests]: http://img.shields.io/travis/zoobestik/csso-webpack-plugin.svg\n[tests-url]: https://travis-ci.org/zoobestik/csso-webpack-plugin\n\n[cover]: https://coveralls.io/repos/github/zoobestik/csso-webpack-plugin/badge.svg\n[cover-url]: https://coveralls.io/github/zoobestik/csso-webpack-plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoobestik%2Fcsso-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoobestik%2Fcsso-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoobestik%2Fcsso-webpack-plugin/lists"}