Skip to content
5 changes: 5 additions & 0 deletions .changeset/rude-sloths-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opennextjs/cloudflare": patch
---

add(patch): Patch getIncrementalCache in route-module.ts for ISR support in Next.js 15.4"
14 changes: 7 additions & 7 deletions packages/cloudflare/src/cli/build/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ function ensureNextjsVersionSupported(options: buildHelper.BuildOptions) {
}
// TODO: remove when 15.4 is supported
// Note: `e2e/experimental` is on 15.4.0-canary.14 which works
if (
!options.appPath.endsWith("opennextjs-cloudflare/examples/e2e/experimental") &&
buildHelper.compareSemver(options.nextVersion, ">=", "15.4.0")
) {
logger.error("Next.js version unsupported, the latest supported version is 15.3");
process.exit(1);
}
// if (
// !options.appPath.endsWith("opennextjs-cloudflare/examples/e2e/experimental") &&
// buildHelper.compareSemver(options.nextVersion, ">=", "15.4.0")
// ) {
// logger.error("Next.js version unsupported, the latest supported version is 15.3");
// process.exit(1);
// }
}
2 changes: 2 additions & 0 deletions packages/cloudflare/src/cli/build/bundle-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { patchPagesRouterContext } from "./patches/plugins/pages-router-context.
import { patchDepdDeprecations } from "./patches/plugins/patch-depd-deprecations.js";
import { fixRequire } from "./patches/plugins/require.js";
import { shimRequireHook } from "./patches/plugins/require-hook.js";
import { patchRouteModules } from "./patches/plugins/route-module.js";
import { setWranglerExternal } from "./patches/plugins/wrangler-external.js";
import { copyPackageCliFiles, needsExperimentalReact, normalizePath } from "./utils/index.js";

Expand Down Expand Up @@ -103,6 +104,7 @@ export async function bundleServer(buildOpts: BuildOptions, projectOpts: Project
inlineFindDir(updater, buildOpts),
inlineLoadManifest(updater, buildOpts),
patchNextServer(updater, buildOpts),
patchRouteModules(updater, buildOpts),
patchDepdDeprecations(updater),
patchResolveCache(updater, buildOpts),
// Apply updater updates, must be the last plugin
Expand Down
Loading
Loading