Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

module.exports missing from dist build #69

Closed
billyjanitsch opened this issue May 12, 2017 · 1 comment
Closed

module.exports missing from dist build #69

billyjanitsch opened this issue May 12, 2017 · 1 comment

Comments

@billyjanitsch
Copy link

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!

kristoforsalmin pushed a commit to kristoforsalmin/web-starter that referenced this issue May 12, 2017
Note that postcss-custom-properties was not updated due to postcss/postcss-custom-properties#69.
Semigradsky added a commit that referenced this issue May 15, 2017
@Semigradsky
Copy link
Member

Sorry, it's my mistake. Fixed in 6.0.1

kristoforsalmin pushed a commit to kristoforsalmin/web-starter that referenced this issue Oct 20, 2017
Note that postcss-custom-properties was not updated due to postcss/postcss-custom-properties#69.
kristoforsalmin added a commit to kristoforsalmin/web-starter that referenced this issue Jul 8, 2019
Note that postcss-custom-properties was not updated due to postcss/postcss-custom-properties#69.
romainmenke pushed a commit to csstools/postcss-plugins that referenced this issue Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants