Skip to content

Commit 4b857d4

Browse files
authored
fix: compatible with vue-query (#149)
1 parent c1e14f2 commit 4b857d4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/devtools-kit/src/api/plugin.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ export async function registerPlugin(options: { app: VueAppInstance, api: DevToo
1414
const { app, api } = options
1515
const plugins = devtoolsState.pluginBuffer.filter(([plugin]) => plugin.app === app)
1616
plugins.forEach(async ([plugin, setupFn]) => {
17+
if (plugin.packageName === 'vue-query') {
18+
/**
19+
* Skip it for now because plugin api doesn't support vue-query devtools plugin:
20+
* https://github.com/TanStack/query/blob/main/packages/vue-query/src/devtools/devtools.ts
21+
* @TODO: Need to discuss if we should be full compatible with the old devtools plugin api.
22+
*/
23+
return
24+
}
25+
1726
const appRecord = await getAppRecord(plugin.app)
1827
// edge case for router plugin
1928
if (plugin.packageName === 'vue-router') {
@@ -25,7 +34,6 @@ export async function registerPlugin(options: { app: VueAppInstance, api: DevToo
2534
}))
2635
}
2736
}
28-
2937
setupFn(api)
3038
})
3139

0 commit comments

Comments
 (0)