interop-require
Require babel's ES6 modules from node.
Last updated 11 years ago by izaakschroeder .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install interop-require 
SYNC missed versions from official npm registry.

interop-require

Require babel's ES6 modules from node.

With the release of babel@6 the way generated modules work now does NOT set the module.exports property; instead it sets exports.default. Of course this basically breaks everything trying to require() it. So this tiny module is a replacement for require() for node-based runtimes that imports the default if an ES6 module is detected. A necessary evil it seems, given this behavior is not changing: https://github.com/babel/babel/issues/2212.

Current Tags

  • 1.0.0                                ...           latest (11 years ago)

1 Versions

  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 16
Today 0
This Week 2
This Month 14
Last Day 0
Last Week 6
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE