@gluons/rollup-plugin-postcss-only
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

rollup-plugin-postcss-only

license npm npm pipeline status

A Rollup plugin to transform CSS via PostCSS.

Installation

Via npm:

npm i -D postcss @gluons/rollup-plugin-postcss-only

Via Yarn:

yarn add -D postcss @gluons/rollup-plugin-postcss-only

Usage

rollup.config.js:

import postcss from '@gluons/rollup-plugin-postcss-only';

export default {
	input: '<your input>',
	output: {
		file: '<your output file>',
		format: '<your format>'
	},
	plugins: [
		postcss(/** Options **/)
	]
};

Options

include

Type: string | RegExp | Array<string | RegExp>
Default: [/\.(s?css|sass)$/i]

Pattern of files to include in processing.

exclude

Type: string | RegExp | Array<string | RegExp>
Default: undefined

Pattern of files to exclude from processing.

extract

Type: boolean
Default: true

Enable CSS extraction.

fileName

Type: string

Specify the name of extracted file.

config

Type: { path: string, context: any }
Default: {}

Configuration information for PostCSS.
See more information in postcss-load-config

  • path: Path to PostCSS config file.
  • context: Context to pass into PostCSS config file.

plugins

Type: Plugin[]
Default: []

PostCSS plugins.

Package Sidebar

Install

npm i @gluons/rollup-plugin-postcss-only

Weekly Downloads

20

Version

4.0.0

License

MIT

Unpacked Size

29.5 kB

Total Files

31

Last publish

Collaborators

  • illuminator