A Rollup plugin that processes inline CSS (template literals or `<style>` tags) with PostCSS. Current stable version is 3.0.1. The plugin supports custom regex and delimiters, environment-based PostCSS config, and multiple style declarations per file. Unlike other PostCSS Rollup plugins (e.g., rollup-plugin-postcss), this one focuses solely on inline styles rather than imported CSS files, making it ideal for Web Components or CSS-in-JS workflows. Version 3 introduced breaking changes including renaming `styleDelineator` to `styleDelimiter` and support for multiple style blocks. Maintained by the author, releases are sporadic.
npm install rollup-plugin-inline-postcssVerified import paths — ran on the pinned version, not inferred.
Shows basic setup with custom regex for <style> tags, environment variable, and PostCSS config path.
Rename `styleDelineator` to `styleDelimiter` in plugin options.
Upgrade PostCSS to v8 or later.
Provide custom `styleRegex` and `styleDelimiter` for other patterns like `<style>` tags.
Use default import: `import inlinePostCSS from '...'`
Avoid manually setting `from` and `to` unless you know what you're doing.
Switch to `import` syntax in an ES module context, or use dynamic import.
Use `import inlinePostCSS from 'rollup-plugin-inline-postcss'`
Run `npm install postcss --save-dev`