MCPcopy
hub / github.com/vitejs/vite / resolveUrl

Method resolveUrl

packages/vite/src/node/server/moduleGraph.ts:421–428  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

419 // 2. resolve its extension so that urls with or without extension all map to
420 // the same module
421 async resolveUrl(url: string): Promise<ResolvedUrl> {
422 url = removeImportQuery(removeTimestampQuery(url))
423 const mod = await this._getUnresolvedUrlToModule(url)
424 if (mod?.id) {
425 return [mod.url, mod.id, mod.meta]
426 }
427 return this._resolveUrl(url)
428 }
429
430 updateModuleTransformResult(
431 mod: EnvironmentModuleNode,

Callers

nothing calls this directly

Calls 4

_resolveUrlMethod · 0.95
removeImportQueryFunction · 0.90
removeTimestampQueryFunction · 0.90

Tested by

no test coverage detected