postcss-scss-import-dedup
PostCSS plugin to remove duplicate
@import
statements.
Installation
With yarn
$ yarn add postcss-scss-import-dedup
Or npm
:
$ npm install --save postcss-scss-import-dedup
Usage
const fs = postcss = syntax = dedupImports = const scss = fs
scss/input.scss
:
;;;
Will give you:
;;
Options
opts.filter
A function that receives a an import string and determines if it should be tracked by the deduper. This can be used as an escape valve while using this plugin.
Default:
null
Example:
Will dedup only @import 'a'
statements.
For more information see the scss-extractor documentation.