Function node_resolve::resolve_from
[−]
[src]
pub fn resolve_from(
target: &str,
basedir: PathBuf
) -> Result<PathBuf, ResolutionError>
Resolve a node.js module path relative to basedir.
Returns the absolute path to the module, or an error.
match resolve_from("./index.js", env::current_dir().unwrap()) { Ok(path) => println!("Path is: {:?}", path), Err(err) => panic!("Failed: {:?}", err), }