0.1.0 • Published 6 years ago
require-module-main v0.1.0
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
0.1.0
6 years ago