@gluons/rollup-plugin-postcss-only

A Rollup plugin to transform CSS via PostCSS.

Stats

StarsIssuesVersionUpdatedCreatedSize
@gluons/rollup-plugin-postcss-only
4.0.09 months ago3 years agoMinified + gzip package size for @gluons/rollup-plugin-postcss-only in KB

Readme

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.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.