You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

interop-require

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interop-require

Require babel's ES6 modules from node.

1.0.0
latest
Source
npm
Version published
Weekly downloads
6.7K
-36.14%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 02 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts