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

Function disconnect

packages/vite/src/node/ssr/runtime/serverModuleRunner.ts:114–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112 handler = onMessage
113 },
114 disconnect() {
115 if (handler) {
116 options.channel.api!.outsideEmitter.off('send', handler)
117 }
118 options.channel.api!.innerEmitter.emit(
119 'vite:client:disconnect',
120 undefined,
121 hmrClient,
122 )
123 },
124 send(payload) {
125 if (payload.type !== 'custom') {
126 throw new Error(

Callers

nothing calls this directly

Calls 1

offMethod · 0.65

Tested by

no test coverage detected