Skip to main content

resolve_require_path

Function resolve_require_path 

Source
pub fn resolve_require_path(
    ctx: &ScriptCtx,
    target: &str,
) -> Result<PathBuf, String>
Expand description

Resolve a (require) target string into an absolute canonical path. Relative paths resolve against the directory of ctx.current_file, or cwd if that’s unset. Absolute paths pass through unchanged.