UNPKG

relative-import-path

Version:

path.relative for generating short require'able paths.

7 lines (6 loc) 268 B
/** * Given two absolute file paths returns a relative importable path. * Applicable `node_modules` resolutions are automatically shortened. * All paths are converted to POSIX style. */ export declare function relativeImportPath(from: string, to: string): string;