Skip to content
Source
Sign inSign up
TanStack/devtools

perf(devtools-vite): add transform hook filters #554

Openshkumbinhasani(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/554/headopened View on GitHub

Showing 6 changed files with 7 additions and 1 deletion (loading 3).

x
0 of 6 viewed, 6 left
5 additions and 0 deletions.changeset/devtools-vite-transform-filters.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/devtools-vite': patch
+---
+​
+Give every transform hook a `filter`, so Vite and Rolldown skip the modules its handler would ignore instead of calling it on every module. Source injection no longer parses `.ts`, `.mts` and `.cts` files, which cannot contain JSX, and the devtools setup file is no longer looked for in `node_modules`.
1 addition and 1 deletionpackages/devtools-vite/skills/devtools-vite-plugin/SKILL.mdModified
View file
@@ -226,7 +226,7 @@
- `bump-package-version` -- updates a package to a minimum version
- `mounted` -- sends package.json and outdated deps to the UI
​
-Auto-detection of the devtools setup file: the `inject-plugin` sub-plugin scans transforms for files importing from `@tanstack/react-devtools`, `@tanstack/solid-devtools`, `@tanstack/vue-devtools`, etc., and stores the file ID.
+Auto-detection of the devtools setup file: the `inject-plugin` sub-plugin scans transformed modules outside `node_modules` for files importing from `@tanstack/react-devtools`, `@tanstack/solid-devtools`, `@tanstack/vue-devtools`, etc., and stores the file ID.
​
**Source files:** `packages/devtools-vite/src/inject-plugin.ts`, `packages/devtools-vite/src/package-manager.ts`
​
1 addition and 0 deletionspackages/devtools-vite/skills/devtools-vite-plugin/references/vite-options.mdModified
View file
@@ -58,6 +58,7 @@
- `?raw` imports