You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a staging environment which mimics production and is a production build.
Sometimes it would be helpful to still get access to the react-query developer tools, but it's currently hard-coded to not exist in production builds.
An easy solution would be to add a prop, like <ReactQueryDevtools enabled={ isAdmin || !env.isProduction } />, but then the devtools wouldn't be tree-shakeable, which I assume it is.
So best solution to this could maybe be to allow the DevTools to be lazy loaded? Something along the lines of:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We have a staging environment which mimics production and is a production build.
Sometimes it would be helpful to still get access to the
react-query
developer tools, but it's currently hard-coded to not exist in production builds.An easy solution would be to add a prop, like
<ReactQueryDevtools enabled={ isAdmin || !env.isProduction } />
, but then the devtools wouldn't be tree-shakeable, which I assume it is.So best solution to this could maybe be to allow the DevTools to be lazy loaded? Something along the lines of:
Not sure how packages or tree-shaking works, but even better would be if could just be imported directly as well:
Where
react-query/devtools
was the current variant as it is, andreact-query/devtools-lazy
was the lazy-loadable variant usable in production.Beta Was this translation helpful? Give feedback.
All reactions