We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17c823b commit 6457d8aCopy full SHA for 6457d8a
packages/devtools-vite/src/plugin.ts
@@ -202,7 +202,19 @@ export const devtools = (args?: TanStackDevtoolsViteConfig): Array<Plugin> => {
202
},
203
enforce: 'pre',
204
transform(code, id) {
205
- if (id.includes('node_modules') || id.includes('?raw')) return
+ const devtoolPackages = [
206
+ '@tanstack/react-devtools',
207
+ '@tanstack/preact-devtools',
208
+ '@tanstack/solid-devtools',
209
+ '@tanstack/vue-devtools',
210
+ '@tanstack/devtools',
211
+ ]
212
+ if (
213
+ id.includes('node_modules') ||
214
+ id.includes('?raw') ||
215
+ !devtoolPackages.some((pkg) => code.includes(pkg))
216
+ )
217
+ return
218
const transform = removeDevtools(code, id)
219
if (!transform) return
220
if (logging) {
0 commit comments