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

Method close

packages/vite/src/module-runner/runner.ts:107–113  ·  view source on GitHub ↗

* Clears all caches, removes all HMR listeners, and resets source map support. * This method doesn't stop the HMR connection.

()

Source from the content-addressed store, hash-verified

105 * This method doesn't stop the HMR connection.
106 */
107 public async close(): Promise<void> {
108 this.resetSourceMapSupport?.()
109 this.clearCache()
110 this.hmrClient = undefined
111 this.closed = true
112 await this.transport.disconnect?.()
113 }
114
115 /**
116 * Returns `true` if the runtime has been closed by calling `close()` method.

Callers

nothing calls this directly

Calls 2

clearCacheMethod · 0.95
disconnectMethod · 0.65

Tested by

no test coverage detected