Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rollup-plugin-sass-postcss

koffeine21MITdeprecated1.0.10

This package has been renamed to @koffeine/rollup-plugin-sass-postcss

Rollup plugin for Sass and PostCSS

rollup, rollup-plugin, sass, scss, postcss

readme

rollup-plugin-sass-postcss

npm version dependency Status devDependency Status

Rollup plugin for Sass and PostCSS

What it does

  • Compiles imported Sass files and transforms those using PostCSS plugins
  • Concatenates and extracts processed styles

Features

  • Uses the sass package
  • Watches for changes in all Sass files loaded during compilation
  • Sourcemap support
    • Only generates and saves sourcemap when requested by the configuration
    • Generates correct sourcemap file that traces back to the original imported file
    • Makes sources relative to cwd

Usage

import sassPostcss from 'rollup-plugin-sass-postcss';

export default {
    // ...
    plugins: [
        sassPostcss({
            // which files should be processed by this plugin
            // type: regular expression, minimatch pattern or an array of regular expressions and minimatch patterns
            include: [ /\.sass/u, /\.scss/u ],

            // which files should not be processed by this plugin
            // type: regular expression, minimatch pattern or an array of regular expressions and minimatch patterns
            exclude: undefined,

            // whether or not to generate and save a sourcemap
            // type: boolean
            sourcemap: false,

            // which PostCSS plugins to use
            // type: array of PostCSS plugins
            plugins: [],

            // where to save the output file (required)
            // type: string
            output: undefined
        })
    ]
    // ...
};

License

Copyright © Kornél Horváth

Licensed under the MIT License.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased]

[1.0.10] - 2020-07-26

Changed

  • Updated @rollup/pluginutils to 3.1.0
  • Updated postcss to 7.0.32
  • Updated sass to 1.26.10
  • Updated devDependencies

Fixed

  • Fixed compatibility with rollup ^2.0.0
  • Fixed watch mode issue by always treating compilation failure as error (throwOnError in no longer an option)

[1.0.9] - 2020-01-14

Changed

  • Updated @rollup/pluginutils to 3.0.4

[1.0.8] - 2020-01-10

Changed

  • Updated sass to 1.24.4
  • Updated postcss to 7.0.26
  • Changed rollup-pluginutils to @rollup/pluginutils
  • Updated devDependencies

[1.0.7] - 2019-12-09

Changed

  • Updated postcss to 7.0.24
  • Updated eslint to 6.7.1
  • Updated eslint-config-koffeine to 14.0.0

[1.0.6] - 2019-11-20

Changed

  • Updated sass to 1.23.7

[1.0.5] - 2019-11-19

Changed

  • Updated postcss to 7.0.23

[1.0.4] - 2019-11-18

Changed

  • Updated sass to 1.23.6

[1.0.3] - 2019-11-04

Changed

  • Updated sass to 1.23.3

[1.0.2] - 2019-10-28

Changed

  • Updated postcss to 7.0.21
  • Updated eslint to 6.6.0
  • Updated eslint-config-koffeine to 13.0.0

[1.0.1] - 2019-10-25

Changed

  • Updated postcss to 7.0.20
  • Updated sass to 1.23.1

[1.0.0] - 2019-10-08

Added

  • Initial public release