zoubin / browserify-postcss

transform contents using postcss
19 stars 10 forks source link

Plugins don't resolve correctly. #3

Closed jsonmaur closed 8 years ago

jsonmaur commented 8 years ago

Doesn't seem to resolve PostCSS plugins correctly. This is what I have:

var postcss = require('browserify-postcss')

b.transform(postcss, {
  plugin: ['sugarss'],
  basedir: path.resolve(__dirname, '../../../'),
  inject: true,
})

The basedir resolves to the root of my project where node_modules is. I have sugarss installed, and I get the following error when trying to bundle:

Error: [object Object] is not a PostCSS plugin
jsonmaur commented 8 years ago

Actually realized sugarss isn't a plugin, it's a parser. My mistake!