Skip to content

Commit

Permalink
fix: restore server rpc listeners when reload client
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Jun 7, 2024
1 parent 8d08934 commit f7ffb32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/client/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'floating-vue/dist/style.css'
import { getViteClient } from 'vite-hot-client'

import { isInSeparateWindow } from '@vue/devtools-shared'
import { VueDevToolsVuePlugin, createViteClientRpc, functions } from '@vue/devtools-core'
import { VueDevToolsVuePlugin, createViteClientRpc, functions, rpc } from '@vue/devtools-core'
import { createRpcClient, setViteClientContext } from '@vue/devtools-kit'
import { createApp } from 'vue'
import type { App as VueApp } from 'vue'
Expand Down Expand Up @@ -104,5 +104,6 @@ export function disconnectDevToolsClient() {
}

export function reloadDevToolsClient() {
rpc.value.initDevToolsServerListener()
vueApp?.config?.globalProperties?.$getDevToolsState()
}

0 comments on commit f7ffb32

Please sign in to comment.