Skip to content

Commit

Permalink
fix: compatible with vue-query (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz authored Jan 4, 2024
1 parent c1e14f2 commit 4b857d4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/devtools-kit/src/api/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ export async function registerPlugin(options: { app: VueAppInstance, api: DevToo
const { app, api } = options
const plugins = devtoolsState.pluginBuffer.filter(([plugin]) => plugin.app === app)
plugins.forEach(async ([plugin, setupFn]) => {
if (plugin.packageName === 'vue-query') {
/**
* Skip it for now because plugin api doesn't support vue-query devtools plugin:
* https://github.com/TanStack/query/blob/main/packages/vue-query/src/devtools/devtools.ts
* @TODO: Need to discuss if we should be full compatible with the old devtools plugin api.
*/
return
}

const appRecord = await getAppRecord(plugin.app)
// edge case for router plugin
if (plugin.packageName === 'vue-router') {
Expand All @@ -25,7 +34,6 @@ export async function registerPlugin(options: { app: VueAppInstance, api: DevToo
}))
}
}

setupFn(api)
})

Expand Down

0 comments on commit 4b857d4

Please sign in to comment.