postcss / postcss-custom-properties

Use Custom Properties in CSS
https://postcss.github.io/postcss-custom-properties
MIT License
596 stars 77 forks source link

module.exports missing from dist build #69

Closed billyjanitsch closed 7 years ago

billyjanitsch commented 7 years ago

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:

  1. Update the readme to reflect this
  2. 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)
  3. Manually add module.exports to index.js
  4. Use a babel plugin like add-module-exports to do it for you

As a user, I'd prefer anything other than 1, and I personally think 2 is the best. Happy to PR any of the options!

Semigradsky commented 7 years ago

Sorry, it's my mistake. Fixed in 6.0.1