core3-utils

@wixc3/fs-utils on Github

Home > @wixc3/fs-utils > rebaseRelativeModulePath

rebaseRelativeModulePath() function

Signature:

export declare function rebaseRelativeModulePath(filePath: string, modulePath: string): string;

Parameters

Parameter Type Description
filePath string full posix path of the file which about to import from `modulePath`
modulePath string full posix path of the imported module

Returns:

string

the relative posix path from filePath to modulePath