File tree 1 file changed +23
-0
lines changed
packages/gatsby/src/utils
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -236,4 +236,27 @@ const activeFlags: Array<IFlag> = [
236
236
} ,
237
237
]
238
238
239
+ if ( _CFLAGS_ . GATSBY_MAJOR === `5` ) {
240
+ activeFlags . push ( {
241
+ name : `PARTIAL_HYDRATION` ,
242
+ env : `GATSBY_PARTIAL_HYDRATION` ,
243
+ command : `build` ,
244
+ telemetryId : `PartialHydration` ,
245
+ description : `Enable partial hydration to reduce Total Blocking Time and Time To Interactive ` ,
246
+ umbrellaIssue : `https://gatsby.dev/partial-hydration-umbrella-issue` ,
247
+ experimental : true ,
248
+ testFitness : ( ) : fitnessEnum => {
249
+ const v18Constraint = {
250
+ react : `>=18.0.0` ,
251
+ }
252
+ const v0Constraint = {
253
+ react : `0.0.0` ,
254
+ }
255
+
256
+ return satisfiesSemvers ( v18Constraint ) || satisfiesSemvers ( v0Constraint )
257
+ } ,
258
+ requires : `Requires React v18 or above.` ,
259
+ } )
260
+ }
261
+
239
262
export default activeFlags
You can’t perform that action at this time.
0 commit comments