import-from
Last updated
Was this helpful?
Last updated
Was this helpful?
Import a module like with but from a given path
Like require()
, throws when the module can't be found.
Returns null
instead of throwing when the module can't be found.
Type: string
Directory to import from.
Type: string
What you would use in require()
.
Create a partial using a bound function if you want to import from the same fromDir
multiple times:
- Import a module from the current working directory
- Resolve the path of a module from a given path
- Resolve the path of a module from the current working directory
- Resolve the path of a package regardless of it having an entry point
- Import modules lazily
MIT ©