@@ -14,10 +14,14 @@ import { installDependencies } from "@opennextjs/aws/build/installDeps.js";
14
14
import type { CodePatcher } from "@opennextjs/aws/build/patch/codePatcher.js" ;
15
15
import { applyCodePatches } from "@opennextjs/aws/build/patch/codePatcher.js" ;
16
16
import {
17
+ patchEnvVars ,
17
18
patchFetchCacheForISR ,
18
19
patchFetchCacheSetMissingWaitUntil ,
20
+ patchNextServer ,
19
21
patchUnstableCacheForISR ,
20
22
} from "@opennextjs/aws/build/patch/patches/index.js" ;
23
+ // TODO: import from patches/index.js when https://github.com/opennextjs/opennextjs-aws/pull/827 is released
24
+ import { patchBackgroundRevalidation } from "@opennextjs/aws/build/patch/patches/patchBackgroundRevalidation.js" ;
21
25
import logger from "@opennextjs/aws/logger.js" ;
22
26
import { minifyAll } from "@opennextjs/aws/minimize-js.js" ;
23
27
import type { ContentUpdater } from "@opennextjs/aws/plugins/content-updater.js" ;
@@ -190,6 +194,9 @@ async function generateBundle(
190
194
patchFetchCacheSetMissingWaitUntil ,
191
195
patchFetchCacheForISR ,
192
196
patchUnstableCacheForISR ,
197
+ patchNextServer ,
198
+ patchEnvVars ,
199
+ patchBackgroundRevalidation ,
193
200
// Cloudflare specific patches
194
201
patchResRevalidate ,
195
202
...additionalCodePatches ,
@@ -220,6 +227,7 @@ async function generateBundle(
220
227
...( disableNextPrebundledReact ? [ "applyNextjsPrebundledReact" ] : [ ] ) ,
221
228
...( disableRouting ? [ "withRouting" ] : [ ] ) ,
222
229
...( isAfter142 ? [ "patchAsyncStorage" ] : [ ] ) ,
230
+ ...( isAfter141 ? [ "appendPrefetch" ] : [ ] ) ,
223
231
] ,
224
232
} ) ,
225
233
openNextReplacementPlugin ( {
0 commit comments