(
url: string,
_ssr?: boolean,
)
| 324 | } |
| 325 | |
| 326 | async getModuleByUrl( |
| 327 | url: string, |
| 328 | _ssr?: boolean, |
| 329 | ): Promise<ModuleNode | undefined> { |
| 330 | // In the mixed graph, the ssr flag was used to resolve the id. |
| 331 | const [clientModule, ssrModule] = await Promise.all([ |
| 332 | this._client.getModuleByUrl(url), |
| 333 | this._ssr.getModuleByUrl(url), |
| 334 | ]) |
| 335 | if (!clientModule && !ssrModule) { |
| 336 | return |
| 337 | } |
| 338 | return this.getBackwardCompatibleModuleNodeDual(clientModule, ssrModule) |
| 339 | } |
| 340 | |
| 341 | getModulesByFile(file: string): Set<ModuleNode> | undefined { |
| 342 | // Until Vite 5.1.x, the moduleGraph contained modules from both the browser and server |
no test coverage detected