This repository was archived by the owner on Oct 26, 2018. It is now read-only.
use exports to be consumable by es6 transpilers (e.g. babel6)
#72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I could have just confused myself, but I believe Babel 6 changed the way cjs files are resolved with named
importstatements in es6. This change meant that cjs files that assigned objects tomodule.exportscannot be destructured within the import statement and results in aModule <whatever> does not export <named-export>error. The solution, it appears, is to assign values to properties on theexportsobject rather than a single object assigned tomodule.exports. Again, I may wrong on what exactly is happening, but it solved the problem for me and all tests pass. Feel free to reject with prejudice if I'm out of my mind. Thanks for the work!