()
| 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( |