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

Method getModuleById

packages/vite/src/node/server/mixedModuleGraph.ts:317–324  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

315 }
316
317 getModuleById(id: string): ModuleNode | undefined {
318 const clientModule = this._client.getModuleById(id)
319 const ssrModule = this._ssr.getModuleById(id)
320 if (!clientModule && !ssrModule) {
321 return
322 }
323 return this.getBackwardCompatibleModuleNodeDual(clientModule, ssrModule)
324 }
325
326 async getModuleByUrl(
327 url: string,

Callers 15

directRequestMethod · 0.45
ssrRewriteStacktraceFunction · 0.45
_getAddedImportsMethod · 0.45
getModuleInfoMethod · 0.45
getModulesByFileMethod · 0.45
hasFunction · 0.45
doTransformFunction · 0.45

Tested by 2

getBrowserModuleFunction · 0.36
getServerModuleFunction · 0.36