sindresorhus / import-from

Import a module like with `require()` but from a given path
MIT License
86 stars 8 forks source link

Use `module.createRequireFromPath()` when available #5

Closed sindresorhus closed 3 years ago

sindresorhus commented 6 years ago

Added module.createRequireFromPath(filename). This new method can be used to create a custom require function that will resolve modules relative to the filename path. #19360 - https://nodejs.org/en/blog/release/v10.12.0/

sindresorhus commented 5 years ago

https://github.com/sindresorhus/import-from/pull/6#issuecomment-497061325