Skip to content

Commit 5e145fc

Browse files
committed
docs: document devtools in production
1 parent 294337a commit 5e145fc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/devtools.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,17 @@ export default App
131131
```
132132

133133
With this, calling `window.toggleDevtools()` will download the devtools bundle and show them.
134+
135+
### Modern bundlers
136+
137+
If your bundler supports package exports, you can use the following import path:
138+
139+
```tsx
140+
const ReactQueryDevtoolsProduction = React.lazy(() =>
141+
import('@tanstack/react-query-devtools/production').then(d => ({
142+
default: d.ReactQueryDevtools
143+
}))
144+
)
145+
```
146+
147+
For TypeScript, you would need to set `moduleResolution: 'NodeNext'` in your tsconfig, which requires at least TypeScript v4.5.

0 commit comments

Comments
 (0)