{"library":"postcss-pipeline-webpack-plugin","title":"postcss-pipeline-webpack-plugin","description":"Webpack 5 plugin that processes generated CSS assets with PostCSS pipelines, enabling multi-file transformations like critical CSS extraction and minification where loaders fall short. Version 6.0.0 (latest) requires Node >=10 and webpack ^5; for webpack 4 use v5, for webpack 3 use v3. Key differentiator: processes all generated CSS files (including those from plugins like MiniCssExtractPlugin) through PostCSS plugins in a pipeline, with support for custom filters, naming (prefix, suffix, transformName), and source maps. Supports PostCSS 6, 7, 8.0.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install postcss-pipeline-webpack-plugin"],"cli":null},"imports":["const PostCssPipelineWebpackPlugin = require('postcss-pipeline-webpack-plugin');","const pipelinePlugin = new PostCssPipelineWebpackPlugin({ processor: postcss([...]) });","plugins: [new PostCssPipelineWebpackPlugin({...})]"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const path = require('path');\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin');\nconst PostCssPipelineWebpackPlugin = require('postcss-pipeline-webpack-plugin');\nconst postcss = require('postcss');\nconst csso = require('postcss-csso');\n\nmodule.exports = {\n  mode: 'production',\n  entry: './src/index.css',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js',\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.css$/,\n        use: [\n          MiniCssExtractPlugin.loader,\n          'css-loader',\n        ],\n      },\n    ],\n  },\n  plugins: [\n    new MiniCssExtractPlugin({\n      filename: 'styles.css',\n    }),\n    new PostCssPipelineWebpackPlugin({\n      suffix: 'min',\n      processor: postcss([\n        csso()\n      ]),\n      map: { inline: false },\n    }),\n  ],\n};","lang":"javascript","description":"Sets up PostCSS pipeline to minify all extracted CSS files using csso, adding a '.min' suffix and generating source maps.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}