Skip to content

Commit 4907718

Browse files
committed
Add support for function-defined plugins
1 parent c6f4180 commit 4907718

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ module.exports = function (source, map) {
1818
if ( params.safe ) opts.safe = true;
1919

2020
var plugins = this.options.postcss;
21+
if ( typeof plugins === 'function' ) {
22+
plugins = plugins.call(this);
23+
}
24+
2125
if ( typeof plugins === 'undefined' ) {
2226
plugins = [];
2327
} else if ( params.pack ) {

0 commit comments

Comments
 (0)