require-module-main

0.1.0 • Public • Published

Status

20180317Sat

Works. But I stopped to investigate whether esm will solve my problems...


Override Module._findPath.

We just have to find the case when there is a package.json. Then defer to original function.


// Need to allow some node_modules to be transpiled by babel-register when using `import-main`.
// Maybe we should make a wrapper called `babel-register-modules` to take care of this... 
require('babel-register')({include: ['node_modules/foo']})
require('import-main')({include: ['node_modules/foo']}

Reference

Readme

Keywords

none

Package Sidebar

Install

npm i require-module-main

Weekly Downloads

1

Version

0.1.0

License

none

Unpacked Size

121 kB

Total Files

26

Last publish

Collaborators

  • vjpr