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

Method fetchModule

packages/vite/src/node/server/environment.ts:241–250  ·  view source on GitHub ↗

* Called by the module runner to retrieve information about the specified * module. Internally calls `transformRequest` and wraps the result in the * format that the module runner understands. * This method is not meant to be called manually.

(
    id: string,
    importer?: string,
    options?: FetchFunctionOptions,
  )

Source from the content-addressed store, hash-verified

239 * This method is not meant to be called manually.
240 */
241 fetchModule(
242 id: string,
243 importer?: string,
244 options?: FetchFunctionOptions,
245 ): Promise<FetchResult> {
246 return fetchModule(this, id, importer, {
247 ...this._remoteRunnerOptions,
248 ...options,
249 })
250 }
251
252 async reloadModule(module: EnvironmentModuleNode): Promise<void> {
253 if (this.config.server.hmr !== false && module.file) {

Callers 1

constructorMethod · 0.95

Calls 1

fetchModuleFunction · 0.90

Tested by

no test coverage detected