devtools: Don't include in Production build, like React Query Devtools
From https://github.com/tannerlinsley/react-query-devtools#usage
By default, React Query Devtools are not imported and used when
process.env.NODE_ENV === 'production', so you don’t need to worry about excluding them during a production build.
And the code looks easy, too! https://github.com/tannerlinsley/react-query-devtools/blob/v1.0.12/index.js
===
I really like this utility (thanks!) but don’t want to have to remember to remove from my component to build an optimized bundle, as RFH itself is the 1st (IE11) and 6th (core) heaviest things I’ve got (is there room for improvement for IE11?) and the 2nd heaviest is a dependency of RFH DevTools.
Details from an unminified build:
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 30 (30 by maintainers)
Oh, nice, will try. tyvm
Oh, sweet. Let me know if you need me to test something with Parcel v1.
Hmm, can’t do that for now. Guess I’ll just manually remove it so it doesn’t affect the Production build.
I’m unsure why this has to be this way when React Query Devtools works as expected but, thanks again for your efforts.
I will release a beta and we can test it out 😃