MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / ensureRel

Function ensureRel

packages/vite/hmr/server/websocket.ts:1786–1786  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

1784 const importerOutRel = outputDirOverrideRel || getProjectRelativeImportPath(importerPath, projectRoot) || stripToProjectRelative(importerPath, projectRoot).replace(/\.(ts|js|tsx|jsx|mjs|mts|cts)$/i, '.mjs');
1785 const importerOutDir = importerOutRel ? path.posix.dirname(importerOutRel) : '';
1786 const ensureRel = (p: string) => (p.startsWith('.') ? p : `./${p}`);
1787
1788 // Normalize all @nativescript/core imports to the unified HTTP ESM core bridge to guarantee a single realm on device
1789 try {

Callers 2

replaceVueImportFunction · 0.85
rewriteImportsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected