Skip to content

Commit b748a5a

Browse files
barrapontoyyx990803
authored andcommitted
support postcss.options.plugins being a function (#866)
1 parent e6abc19 commit b748a5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/style-compiler/load-postcss-config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ module.exports = function loadPostcssConfig (loaderContext, inlineConfig) {
2727
if (Array.isArray(inlineConfig)) {
2828
plugins = inlineConfig
2929
} else if (isObject(inlineConfig)) {
30-
plugins = inlineConfig.plugins || []
30+
plugins = (typeof inlineConfig.plugins === 'function')
31+
? inlineConfig.plugins.call(this, this)
32+
: inlineConfig.plugins || []
3133
options = inlineConfig.options || {}
3234
}
3335

0 commit comments

Comments
 (0)