The usage docs are no longer correct as of 6.0.0. Babel transpiles export default to exports.default, so you have to do require('postcss-custom-properties').default to get the main plugin function.
A few potential solutions:
Update the readme to reflect this
Remove the babel transpilation step entirely (I'm not sure why it's needed now that this library depends on postcss@6 which has dropped support for non-ES6 versions of node, and nothing >ES6 is used in this codebase that I can see)
The usage docs are no longer correct as of 6.0.0. Babel transpiles
export default
toexports.default
, so you have to dorequire('postcss-custom-properties').default
to get the main plugin function.A few potential solutions:
module.exports
to index.jsadd-module-exports
to do it for youAs a user, I'd prefer anything other than 1, and I personally think 2 is the best. Happy to PR any of the options!