@@ -19,6 +19,7 @@ import {
1919 patchFetchCacheSetMissingWaitUntil ,
2020 patchNextServer ,
2121 patchUnstableCacheForISR ,
22+ patchUseCacheForISR ,
2223} from "@opennextjs/aws/build/patch/patches/index.js" ;
2324// TODO: import from patches/index.js when https://github.com/opennextjs/opennextjs-aws/pull/827 is released
2425import { patchBackgroundRevalidation } from "@opennextjs/aws/build/patch/patches/patchBackgroundRevalidation.js" ;
@@ -209,6 +210,7 @@ async function generateBundle(
209210 patchFetchCacheSetMissingWaitUntil ,
210211 patchFetchCacheForISR ,
211212 patchUnstableCacheForISR ,
213+ patchUseCacheForISR ,
212214 patchNextServer ,
213215 patchEnvVars ,
214216 patchBackgroundRevalidation ,
@@ -232,7 +234,11 @@ async function generateBundle(
232234 const isAfter141 = buildHelper . compareSemver ( options . nextVersion , ">=" , "14.1" ) ;
233235 const isAfter142 = buildHelper . compareSemver ( options . nextVersion , ">=" , "14.2" ) ;
234236
235- const isAfter153 = buildHelper . compareSemver ( options . nextVersion , ">=" , "15.3.0" ) ;
237+ const isAfter152 = buildHelper . compareSemver (
238+ options . nextVersion ,
239+ ">=" ,
240+ "15.2.0" ,
241+ ) ;
236242
237243 const disableRouting = isBefore13413 || config . middleware ?. external ;
238244
@@ -254,7 +260,7 @@ async function generateBundle(
254260 ...( disableNextPrebundledReact ? [ "requireHooks" ] : [ ] ) ,
255261 ...( isBefore13413 ? [ "trustHostHeader" ] : [ "requestHandlerHost" ] ) ,
256262 ...( isAfter141 ? [ "experimentalIncrementalCacheHandler" ] : [ "stableIncrementalCache" ] ) ,
257- ...( isAfter153 ? [ "" ] : [ "composableCache" ] ) ,
263+ ...( isAfter152 ? [ "" ] : [ "composableCache" ] ) ,
258264 ] ,
259265 } ) ,
260266
0 commit comments