@@ -14,6 +14,7 @@ const globals = {
1414}
1515
1616const inputSrc = 'src/react/index.js'
17+ const hydrationSrc = 'src/hydration/index.js'
1718
1819export default [
1920 {
@@ -66,7 +67,66 @@ export default [
6667 externalDeps ( ) ,
6768 terser ( ) ,
6869 size ( ) ,
69- visualizer ( ) ,
70+ visualizer ( {
71+ filename : 'stats-react.json' ,
72+ json : true ,
73+ } ) ,
74+ ] ,
75+ } ,
76+ {
77+ input : hydrationSrc ,
78+ output : {
79+ file : 'dist/hydration/react-query-hydration.mjs' ,
80+ format : 'es' ,
81+ sourcemap : true ,
82+ } ,
83+ external,
84+ plugins : [ resolve ( ) , babel ( ) , commonJS ( ) , externalDeps ( ) ] ,
85+ } ,
86+ {
87+ input : hydrationSrc ,
88+ output : {
89+ file : 'dist/hydration/react-query-hydration.min.mjs' ,
90+ format : 'es' ,
91+ sourcemap : true ,
92+ } ,
93+ external,
94+ plugins : [ resolve ( ) , babel ( ) , commonJS ( ) , externalDeps ( ) , terser ( ) ] ,
95+ } ,
96+ {
97+ input : hydrationSrc ,
98+ output : {
99+ name : 'ReactQueryHydration' ,
100+ file : 'dist/hydration/react-query-hydration.development.js' ,
101+ format : 'umd' ,
102+ sourcemap : true ,
103+ globals,
104+ } ,
105+ external,
106+ plugins : [ resolve ( ) , babel ( ) , commonJS ( ) , externalDeps ( ) ] ,
107+ } ,
108+ {
109+ input : hydrationSrc ,
110+ output : {
111+ name : 'ReactQueryHydration' ,
112+ file : 'dist/hydration/react-query-hydration.production.min.js' ,
113+ format : 'umd' ,
114+ sourcemap : true ,
115+ globals,
116+ } ,
117+ external,
118+ plugins : [
119+ replace ( { 'process.env.NODE_ENV' : `"production"` , delimiters : [ '' , '' ] } ) ,
120+ resolve ( ) ,
121+ babel ( ) ,
122+ commonJS ( ) ,
123+ externalDeps ( ) ,
124+ terser ( ) ,
125+ size ( ) ,
126+ visualizer ( {
127+ filename : 'stats-hydration.json' ,
128+ json : true ,
129+ } ) ,
70130 ] ,
71131 } ,
72132]
0 commit comments