Skip to content

Commit 17f59c5

Browse files
committed
load plugins by name only if a string is used
Add ability to load plugins like cssnext(options) (which returns processor object, not function)
1 parent bd37b38 commit 17f59c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ module.exports = function (browserify, options) {
117117

118118
// load plugins by name (if a string is used)
119119
plugins = plugins.map(function requirePlugin (name) {
120-
// assume functions are already required plugins
121-
if (typeof name === 'function') {
120+
// assume not strings are already required plugins
121+
if (typeof name !== 'string') {
122122
return name;
123123
}
124124

0 commit comments

Comments
 (0)