{"id":25024,"library":"broccoli-postcss","title":"broccoli-postcss","description":"Broccoli plugin to compile CSS through PostCSS plugins. Current stable version is 6.1.0 (PostCSS 8), compatible with Node >=10. Release cadence is low; last update was 2020. Key differentiators: integrates PostCSS into the Broccoli build pipeline, supports whitelist/blacklist filtering via globs, source map configuration, and two plugin definition styles (object and function forms). Alternative to using PostCSS CLI or other build tool integrations.","status":"maintenance","version":"6.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/jeffjewiss/broccoli-postcss","tags":["javascript","broccoli-plugin","css","postcss","postcss-runner"],"install":[{"cmd":"npm install broccoli-postcss","lang":"bash","label":"npm"},{"cmd":"yarn add broccoli-postcss","lang":"bash","label":"yarn"},{"cmd":"pnpm add broccoli-postcss","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Underlying filter mechanism for incremental builds","package":"broccoli-persistent-filter","optional":false},{"reason":"Peer dependency for PostCSS functionality","package":"postcss","optional":false}],"imports":[{"note":"Library does not support ES modules; CommonJS only.","wrong":"import compileCSS from 'broccoli-postcss'","symbol":"default","correct":"const compileCSS = require('broccoli-postcss')"},{"note":"Default export is a function, not a named export.","wrong":"const { compileCSS } = require('broccoli-postcss')","symbol":"default","correct":"const compileCSS = require('broccoli-postcss')"},{"note":"No type definitions available; use any or write own types.","wrong":"import compileCSS from 'broccoli-postcss'","symbol":"default (TypeScript)","correct":"const compileCSS: any = require('broccoli-postcss')"}],"quickstart":{"code":"const compileCSS = require('broccoli-postcss');\nconst cssnext = require('postcss-cssnext');\nconst options = {\n  plugins: [\n    {\n      module: cssnext,\n      options: { browsers: ['last 2 versions'] }\n    }\n  ],\n  map: false,\n  include: ['styles/*.css'],\n  exclude: ['vendor/**/*']\n};\nconst outputTree = compileCSS('app/styles', options);\nmodule.exports = outputTree;","lang":"javascript","description":"Configures broccoli-postcss with one plugin (postcss-cssnext), sets source maps off, includes styles/*.css, excludes vendor/**/*."},"warnings":[{"fix":"Update all postcss plugins to versions supporting PostCSS 8, or stay on v5 with PostCSS 7.","message":"Version 6 requires PostCSS 8. PostCSS 8 uses a new plugin API; some plugins may not be compatible.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Upgrade Node.js to version 10 or higher.","message":"Node.js >=10 required as of version 6.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Remove 'browsers' from options and set up browserslist in your project.","message":"The 'browsers' option is deprecated; use browserslist configuration (package.json or .browserslistrc) instead.","severity":"deprecated","affected_versions":">=5.0.0"},{"fix":"Use object form: { module: require('plugin'), options: { ... } }","message":"Plugins defined in function form cannot have additional options merged (e.g., map). Use object form for extra options.","severity":"gotcha","affected_versions":"all"},{"fix":"Use require() instead of import.","message":"The library is CommonJS only; ES module imports (import) will fail.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install --save-dev postcss","cause":"postcss is a peer dependency and not installed automatically.","error":"Error: Cannot find module 'postcss'"},{"fix":"Ensure plugins are compatible with PostCSS 8 and use object form: { module: require('plugin'), options: {} }","cause":"Plugin may be incompatible with PostCSS 8 or not using object form correctly.","error":"TypeError: options.plugins[0].module is not a constructor","error2":"Error: Plugin ... failed: Cannot read property 'postcss' of undefined"},{"fix":"Use import or ensure you are using CommonJS (type: 'commonjs' in package.json).","cause":"Trying to use require() in an ES module context.","error":"ReferenceError: require is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}