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 17
17
"files" : [
18
18
" build/lib/*" ,
19
19
" build/umd/*" ,
20
+ " cjs.fallback.js" ,
20
21
" src"
21
22
],
22
23
"exports" : {
29
30
"default" : {
30
31
"types" : " ./build/lib/index.d.ts" ,
31
32
"import" : " ./build/lib/noop.mjs" ,
32
- "default" : " ./build/lib/noop .js"
33
+ "default" : " ./cjs.fallback .js"
33
34
}
34
35
},
35
36
"./production" : {
You can’t perform that action at this time.
0 commit comments