MCPcopy
hub / github.com/rollup/rollup / relativeId

Function relativeId

src/utils/relativeId.ts:9–12  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

7}
8
9export default function relativeId(id: string): string {
10 if (!isAbsolute(id)) return id;
11 return relative(resolve(), id);
12}
13
14export function isPathFragment(name: string): boolean {
15 // starting with "/", "./", "../", "C:/"

Callers 15

handleErrorFunction · 0.85
loadTranspiledConfigFileFunction · 0.85
MISSING_EXPORTFunction · 0.85
MIXED_EXPORTSFunction · 0.85
NAMESPACE_CONFLICTFunction · 0.85
UNRESOLVED_IMPORTFunction · 0.85
showTruncatedWarningsFunction · 0.85
buildFunction · 0.85
addModuleSourceMethod · 0.85
augmentLogMessageFunction · 0.85

Calls 3

isAbsoluteFunction · 0.90
relativeFunction · 0.90
resolveFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…