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

Function toAppModuleBaseId

packages/vite/hmr/server/websocket.ts:1098–1105  ·  view source on GitHub ↗
(importPath: string, projectRoot?: string)

Source from the content-addressed store, hash-verified

1096}
1097
1098function toAppModuleBaseId(importPath: string, projectRoot?: string): string | null {
1099 const projectRelative = getProjectRelativeImportPath(importPath, projectRoot);
1100 if (!projectRelative) {
1101 return null;
1102 }
1103 const base = projectRelative.replace(/\.mjs$/i, '');
1104 return `/${base}`;
1105}
1106
1107function normalizeAbsoluteFilesystemImport(spec: string, importerPath: string, projectRoot?: string): string | null {
1108 if (!spec || typeof spec !== 'string') {

Callers 2

replaceVueImportFunction · 0.85
rewriteImportsFunction · 0.85

Calls 2

replaceMethod · 0.80

Tested by

no test coverage detected