File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
packages/react-query-devtools Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ // This is the cjs fallback for bundlers that do not support exports.development conditional
2+ if ( process . env . NODE_ENV !== 'development' ) {
3+ module . exports = {
4+ ReactQueryDevtools : function ( ) {
5+ return null
6+ } ,
7+ ReactQueryDevtoolsPanel : function ( ) {
8+ return null
9+ } ,
10+ }
11+ } else {
12+ module . exports = require ( './build/lib/index.js' )
13+ }
Original file line number Diff line number Diff line change 1717 "files" : [
1818 " build/lib/*" ,
1919 " build/umd/*" ,
20+ " cjs.fallback.js" ,
2021 " src"
2122 ],
2223 "exports" : {
2930 "default" : {
3031 "types" : " ./build/lib/index.d.ts" ,
3132 "import" : " ./build/lib/noop.mjs" ,
32- "default" : " ./build/lib/noop .js"
33+ "default" : " ./cjs.fallback .js"
3334 }
3435 },
3536 "./production" : {
You can’t perform that action at this time.
0 commit comments