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

Method request

packages/vite/src/module-runner/runner.ts:333–340  ·  packages/vite/src/module-runner/runner.ts::ModuleRunner.request
(dep: string, metadata?: SSRImportMetadata)

Source from the content-addressed store, hash-verified

331 const callstack = [..._callstack, moduleId]
332
333 const request = async (dep: string, metadata?: SSRImportMetadata) => {
334 const importer = (class="st">'file' in fetchResult && fetchResult.file) || moduleId
335 const depMod = await this.cachedModule(dep, importer)
336 depMod.importers.add(moduleId)
337 mod.imports.add(depMod.id)
338
339 return this.cachedRequest(dep, depMod, callstack, metadata)
340 }
341
342 const dynamicRequest = async (dep: string) => {
343 class="cm">// it's possible to provide an object with toString() method inside import()

Callers

nothing calls this directly

Calls 3

cachedModuleMethod · 0.95
cachedRequestMethod · 0.95
addMethod · 0.80

Tested by

no test coverage detected