Skip to content
This repository has been archived by the owner on Dec 12, 2017. It is now read-only.

Commit

Permalink
cooking: fix postcss
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Sep 19, 2016
1 parent 3804042 commit b18cd82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# CHANGELOG

## [v1.1.1] 未发布
- cooking: 修复 postcss 传函数时无法获取 `webpack` 参数

## [v1.1.0] 2016.09.19
- cooking-cli: 修复 NODE_PATH 匹配顺序,用户配置放在最后

Expand Down
12 changes: 3 additions & 9 deletions packages/cooking/util/load-postcss.js
Expand Up @@ -3,13 +3,7 @@
const isArray = require('./is').Array

module.exports = function (plugins) {
let postcss = plugins

if (isArray(plugins)) {
postcss = function () {
return plugins
}
}

return postcss
return isArray(plugins) ?
() => plugins :
() => plugins.apply(this, arguments)
}

0 comments on commit b18cd82

Please sign in to comment.