1.0.10 • Published 4 years ago
rollup-plugin-sass-postcss v1.0.10
rollup-plugin-sass-postcss
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.