@@ -34,8 +34,8 @@ import { usePathname } from "next/navigation";
3434import { useRouter } from "next/router" ;
3535import { persistQueryClient } from "@tanstack/react-query-persist-client" ;
3636import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister" ;
37+
3738TimeAgo . addDefaultLocale ( en ) ;
38- import { ReactQueryDevtools } from "@tanstack/react-query-devtools" ;
3939
4040const queryClient = new QueryClient ( ) ;
4141const clientSideEmotionCache = createEmotionCache ( ) ;
@@ -70,7 +70,7 @@ const App = (props) => {
7070 if ( ! queryKey || ! queryKey . length ) {
7171 return false ;
7272 }
73- const queryKeyString = String ( queryKey [ 0 ] || '' ) ;
73+ const queryKeyString = String ( queryKey [ 0 ] || "" ) ;
7474 const excludeFromPersisting = excludeQueryKeys . some ( ( key ) =>
7575 queryKeyString . includes ( key )
7676 ) ;
@@ -132,6 +132,12 @@ const App = (props) => {
132132 } ,
133133 ] ;
134134
135+ const ReactQueryDevtoolsProduction = React . lazy ( ( ) =>
136+ import ( "@tanstack/react-query-devtools/build/modern/production.js" ) . then ( ( d ) => ( {
137+ default : d . ReactQueryDevtools ,
138+ } ) )
139+ ) ;
140+
135141 return (
136142 < CacheProvider value = { emotionCache } >
137143 < Head >
@@ -178,7 +184,7 @@ const App = (props) => {
178184 </ ThemeProvider >
179185 { settings . isInitialized && settings ?. showDevtools === true ? (
180186 < React . Suspense fallback = { null } >
181- < ReactQueryDevtools />
187+ < ReactQueryDevtoolsProduction />
182188 </ React . Suspense >
183189 ) : null }
184190 </ >
0 commit comments