Transform PostCSS in Rollup using options from a postcss config file (postcss.config.js). v2.0.0 is the latest stable release, last published in 2018. It relies on postcss-load-config to read config files and makes no assumptions about CSS output, requiring a separate plugin (e.g., rollup-plugin-string) to handle the transformed CSS. Key differentiators: minimal integration that delegates plugin configuration to standard PostCSS config files, unlike alternatives like rollup-plugin-postcss which bundle plugins internally. Breaking change in v2.0.0: uses object spread syntax, requiring Node >=8.6.0. No further updates expected.
npm install rollup-plugin-postcss-configVerified import paths — ran on the pinned version, not inferred.
Configure PostCSS via postcss.config.js and use rollup-plugin-postcss-config with a string plugin to output CSS as a string.
Upgrade Node to version >=8.6.0 or avoid using spread syntax if you must stay on older Node.
Add a subsequent plugin in the plugins array that includes the same CSS files, e.g., `string({ include: '*.css' })`.Check compatibility with your Rollup version; consider using rollup-plugin-postcss or rollup-plugin-postcss-lit as alternatives.
Use `import postcss from 'rollup-plugin-postcss-config'` in an ES module context, or use dynamic import: `const postcss = (await import('rollup-plugin-postcss-config')).default`.Ensure a valid `postcss.config.js` exists in the project root with a `plugins` object/array.
Create a `postcss.config.js` file in the project root, or specify a custom `config` path in plugin options (not supported by this version).