getModuleByUrl() — vite Function Reference
Architecture documentation for the getModuleByUrl() function in mixedModuleGraph.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD bb2dfb3b_2e6d_7715_aedc_b7f63a711219["getModuleByUrl()"] c1a5c030_6aae_0cbb_cc67_256559724512["ModuleGraph"] bb2dfb3b_2e6d_7715_aedc_b7f63a711219 -->|defined in| c1a5c030_6aae_0cbb_cc67_256559724512 24ecf2a1_3c09_d451_76f3_9485b4e993f8["_createServer()"] 24ecf2a1_3c09_d451_76f3_9485b4e993f8 -->|calls| bb2dfb3b_2e6d_7715_aedc_b7f63a711219 f65dbf66_c4b6_3d7a_622d_0f65ec92d086["getBackwardCompatibleModuleNodeDual()"] bb2dfb3b_2e6d_7715_aedc_b7f63a711219 -->|calls| f65dbf66_c4b6_3d7a_622d_0f65ec92d086 47338255_0359_1ee9_69c4_4c16cb66262e["getModuleByUrl()"] bb2dfb3b_2e6d_7715_aedc_b7f63a711219 -->|calls| 47338255_0359_1ee9_69c4_4c16cb66262e style bb2dfb3b_2e6d_7715_aedc_b7f63a711219 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/server/mixedModuleGraph.ts lines 326–339
async getModuleByUrl(
url: string,
_ssr?: boolean,
): Promise<ModuleNode | undefined> {
// In the mixed graph, the ssr flag was used to resolve the id.
const [clientModule, ssrModule] = await Promise.all([
this._client.getModuleByUrl(url),
this._ssr.getModuleByUrl(url),
])
if (!clientModule && !ssrModule) {
return
}
return this.getBackwardCompatibleModuleNodeDual(clientModule, ssrModule)
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does getModuleByUrl() do?
getModuleByUrl() is a function in the vite codebase, defined in packages/vite/src/node/server/mixedModuleGraph.ts.
Where is getModuleByUrl() defined?
getModuleByUrl() is defined in packages/vite/src/node/server/mixedModuleGraph.ts at line 326.
What does getModuleByUrl() call?
getModuleByUrl() calls 2 function(s): getBackwardCompatibleModuleNodeDual, getModuleByUrl.
What calls getModuleByUrl()?
getModuleByUrl() is called by 1 function(s): _createServer.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free