{"id":48239649,"url":"https://github.com/mistakster/postcss-pipeline-webpack-plugin","last_synced_at":"2026-04-04T20:15:11.571Z","repository":{"id":55520090,"uuid":"75802009","full_name":"mistakster/postcss-pipeline-webpack-plugin","owner":"mistakster","description":"A webpack plugin to process generated assets with PostCSS pipeline","archived":false,"fork":false,"pushed_at":"2020-12-25T04:28:46.000Z","size":393,"stargazers_count":49,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-20T22:46:21.564Z","etag":null,"topics":["csso","optimization","postcss","postcss-pipeline","webpack","webpack-plugin","webpack4"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mistakster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-07T05:19:42.000Z","updated_at":"2022-11-13T13:45:26.000Z","dependencies_parsed_at":"2022-08-15T02:20:20.409Z","dependency_job_id":null,"html_url":"https://github.com/mistakster/postcss-pipeline-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/mistakster/postcss-pipeline-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistakster%2Fpostcss-pipeline-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistakster%2Fpostcss-pipeline-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistakster%2Fpostcss-pipeline-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistakster%2Fpostcss-pipeline-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mistakster","download_url":"https://codeload.github.com/mistakster/postcss-pipeline-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistakster%2Fpostcss-pipeline-webpack-plugin/sbom","scorecard":{"id":649871,"data":{"date":"2025-08-11","repo":{"name":"github.com/mistakster/postcss-pipeline-webpack-plugin","commit":"ab309e67e49a67fd61fe98ec6925f4a4586929b2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"26 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T13:14:35.471Z","repository_id":55520090,"created_at":"2025-08-21T13:14:35.471Z","updated_at":"2025-08-21T13:14:35.471Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31412202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["csso","optimization","postcss","postcss-pipeline","webpack","webpack-plugin","webpack4"],"created_at":"2026-04-04T20:15:11.484Z","updated_at":"2026-04-04T20:15:11.561Z","avatar_url":"https://github.com/mistakster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-pipeline-webpack-plugin\n\n[![Build Status](https://travis-ci.org/mistakster/postcss-pipeline-webpack-plugin.svg?branch=master)](https://travis-ci.org/mistakster/postcss-pipeline-webpack-plugin)\n\nA [webpack] plugin to process generated assets with [PostCSS] pipeline.\n\n## Preface\n\nWebpack loaders are pretty cool but limited to process and generate only one file at a time.\nIf you are extracting critical CSS or media queries into separate files,\nyou are no longer able to process these files. This plugin was made to solve this problem.\n\n## Install\n\n```\nnpm install --save postcss-pipeline-webpack-plugin\n```\n\n## Compatibility\n\nIt requires webpack 5.x to work.\n\nFor webpack 4.x use [postcss-pipeline-webpack-plugin@5] package.\n\nFor webpack 3.x use [postcss-pipeline-webpack-plugin@3] package.\n\nThe plugin is compatible with PostCSS 6.x, 7.x and 8.x branches.\n\n## Usage\n\n```js\nconst postcss = require('postcss');\nconst PostCssPipelineWebpackPlugin = require('postcss-pipeline-webpack-plugin');\n\nconst pipelinePlugin = new PostCssPipelineWebpackPlugin({\n  processor: postcss([\n      // provide any PostCSS plugins here\n  ]),\n  // provide an optional function to filter out unwanted CSS\n  predicate: name =\u003e /foobar.css$/.test(name),\n  // provide an optional string attached to the beginning of a new file\n  prefix: 'critical',\n  // provide an optional string which will be using as a suffix for newly generated files\n  suffix: 'processed',\n  // or you can generate the name by yourself\n  transformName: name =\u003e 'critical-' + name,\n  // you can pass any relevant SourceMap options\n  // see https://github.com/postcss/postcss/blob/master/docs/source-maps.md\n  map: {}\n});\n```\n\nSo, you can use this initialized instance of the plugin in webpack configuration later.\n\n```js\nmodule.exports = {\n  mode: 'production',\n\n  entry: './src/index.css',\n\n  output: {\n    path: path.resolve('./dest/'),\n    filename: '[name].js'\n  },\n\n  module: {\n    rules: [\n      {\n        test: /\\.css$/,\n        use: [\n          MiniCssExtractPlugin.loader,\n          'css-loader'\n        ]\n      }\n    ]\n  },\n\n  plugins: [\n    new MiniCssExtractPlugin({\n      filename: 'styles.css'\n    }),\n    pipelinePlugin\n  ]\n};\n```\n\n## Advanced techniques\n\nFor example, you may want to process your styles with [postcss-critical-css] plugin.\nIt generates an additional file, which contains only styles between start- and stop-tags.\nYou can’t use the optimization of generated styles before the plugin because minification removes all comments.\nSo, you have to minify “all” and “critical” parts separately.\n\nIt’s pretty easy with **postcss-pipeline-webpack-plugin**. You can provide as many PostCSS pipelines as you need.\n\nFor the task, we need to set up two pipelines with one plugin in each other:\n\n* postcss-critical-split\n* postcss-csso\n\n```js\nconst PostCssPipelineWebpackPlugin = require('postcss-pipeline-webpack-plugin');\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin');\nconst postcss = require('postcss');\nconst criticalSplit = require('postcss-critical-split');\nconst csso = require('postcss-csso');\n\nmodule.exports = {\n  // ...\n  plugins: [\n    new MiniCssExtractPlugin({\n      filename: 'styles.css'\n    }),\n    new PostCssPipelineWebpackPlugin({\n      suffix: 'critical',\n      processor: postcss([\n        criticalSplit({\n          output: criticalSplit.output_types.CRITICAL_CSS\n        })\n      ])\n    }),\n    new PostCssPipelineWebpackPlugin({\n      suffix: 'min',\n      processor: postcss([\n        csso({\n          restructure: false\n        })\n      ]),\n      map: {\n        inline: false\n      }\n    })\n  ]\n};\n```\n\n1) Webpack extracts all CSS into:\n\n```text\nstyles.css\n```\n\n2) PostCSS generates critical CSS into `styles.critical.css`. So, you get two files:\n\n```text\nstyles.css\nstyles.critical.css\n```\n\n3) PostCSS optimize both files with [csso] and create relevant SourceMaps for them:\n\n```text\nstyles.css\nstyles.critical.css\nstyles.min.css\nstyles.min.css.map\nstyles.critical.min.css\nstyles.critical.min.css.map\n```\n\nAs you can see, webpack generates artifacts in **one pass**.\n\nSee full [webpack.config.js](./examples/webpack.config.js) for more details.\n\n## Change log\n\n### 6.0.0\n\n\u003e 2020-12-24\n\n- *[breaking]* made the plugin fully compatible with webpack v5  \n\n### 5.1.2\n\n\u003e 2019-08-02\n\n- *[minor]* updated dependencies \n\n### 5.1.1\n\n\u003e 2019-07-07\n\n- *[minor]* updated version of the engines\n\n### 5.1.0\n\n\u003e 2019-07-03\n\n- *[major]* added `transformName` option to generate destination filenames \n\n### 5.0.0\n\n\u003e 2019-03-09\n\n- *[breaking]* `pipeline` option was replaced with `processor` to let the developer decide which version of the PostCSS to use\n- *[minor]* improved examples and documentation\n\n### 4.1.2\n\n\u003e 2019-03-09\n\n- *[minor]* fixed semver incompatibility\n\n### 4.1.1\n\n\u003e 2019-03-05\n\n**DEPRECATED**\n\n### 4.1.0\n\n\u003e 2018-07-30\n\n- *[major]* added `prefix` option\n\n### 4.0.0\n\n\u003e 2018-03-27\n\n- *[major]* added webpack 4 support\n\n### 3.1.0\n\n\u003e 2018-02-05\n\n- *[major]* made the plugin compatible with filename’s template like `[name].css?[contenthash]`\n\n### 3.0.1\n\n\u003e 2017-08-14\n\n- *[minor]* upgraded webpack-sources module\n\n### 3.0.0\n\n\u003e 2017-05-30\n\n- *[breaking]* set minimal required node.js version to 4.7\n- *[breaking]* upgraded PostCSS and other minor dependencies\n\n### 2.0.0\n\n\u003e 2017-03-20\n\n- *[breaking]* switched to webpack 2 and upgraded minor dependencies\n\n### 1.2.0\n\n\u003e 2016-12-28\n\n- *[fix]* added previously generated Source Maps\n\n### 1.1.0\n\n\u003e 2016-12-27\n\n- *[feature]* `suffix` can contain any falsy value to skip rename\n- *[fix]* added module.exports to main file\n\n### 1.0.0\n\n\u003e 2016-12-20\n\n- initial release\n\n## License\n\nISC\n\n[PostCSS]: https://github.com/postcss/postcss\n[webpack]: https://webpack.js.org\n[postcss-critical-css]: https://medium.com/@nocreativity/manage-your-critical-css-with-this-postcss-plugin-6be1ca226c06#.abnvj11p7\n[csso]: https://github.com/css/csso\n[postcss-pipeline-webpack-plugin@5]: https://www.npmjs.com/package/postcss-pipeline-webpack-plugin/v/5.1.2\n[postcss-pipeline-webpack-plugin@3]: https://www.npmjs.com/package/postcss-pipeline-webpack-plugin/v/3.1.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistakster%2Fpostcss-pipeline-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmistakster%2Fpostcss-pipeline-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistakster%2Fpostcss-pipeline-webpack-plugin/lists"}