require-module-main
## 20180317Sat
Last updated 2 years ago by vjpr .
Original npm · Tarball · package.json
$ cnpm install require-module-main 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.0                                ...           latest (2 years ago)

1 Versions

  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 0
Dependencies (12)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |