MCPcopy Create free account
hub / github.com/TanStack/devtools / transform

Function transform

packages/devtools-vite/src/plugin.ts:334–349  ·  view source on GitHub ↗
(code, id)

Source from the content-addressed store, hash-verified

332 },
333 enforce: 'pre',
334 transform(code, id) {
335 if (
336 id.includes('node_modules') ||
337 id.includes('?raw') ||
338 !TANSTACK_DEVTOOLS_PACKAGES.some((pkg) => code.includes(pkg))
339 )
340 return
341 const transform = removeDevtools(code, id)
342 if (!transform) return
343 if (logging) {
344 console.log(
345 `\n${chalk.greenBright(`[@tanstack/devtools-vite]`)} Removed devtools code from: ${id.replace(normalizePath(process.cwd()), '')}\n`,
346 )
347 }
348 return transform
349 },
350 },
351 {
352 name: '@tanstack/devtools:event-client-setup',

Callers 1

index.test.tsFile · 0.85

Calls 3

removeDevtoolsFunction · 0.90
detectDevtoolsFileFunction · 0.90
injectRuntimeBridgeFunction · 0.90

Tested by

no test coverage detected