Skip to content

Commit eac52f6

Browse files
authored
fix(devtools): import useQueryClient directly from react-query (#2113)
1 parent f899e55 commit eac52f6

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
],
3030
"no-shadow": "error",
3131
"import/no-cycle": "error",
32-
"import/no-unresolved": "error",
32+
"import/no-unresolved": ["error", { "ignore": ["react-query"] }],
3333
"import/no-unused-modules": ["off", { "unusedExports": true }],
3434
"no-redeclare": "off"
3535
}

rollup.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import commonJS from 'rollup-plugin-commonjs'
77
import visualizer from 'rollup-plugin-visualizer'
88
import replace from '@rollup/plugin-replace'
99

10-
const external = ['react', 'react-dom']
10+
const external = ['react', 'react-dom', 'react-query']
1111

1212
const globals = {
1313
react: 'React',
1414
'react-dom': 'ReactDOM',
15+
'react-query': 'ReactQuery',
1516
}
1617

1718
const inputSrcs = [

src/devtools/devtools.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// @ts-nocheck
22

33
import React from 'react'
4+
5+
import { useQueryClient } from 'react-query'
46
import { matchSorter } from 'match-sorter'
5-
import { useQueryClient } from '../react'
67
import useLocalStorage from './useLocalStorage'
78
import { useSafeState } from './utils'
89

0 commit comments

Comments
 (0)