From 18e9c1c2439716c0f6f9c13de8907cefabd7a056 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Fri, 27 Jun 2025 11:12:15 +0200 Subject: [PATCH 01/10] add a changelog entry about Open Next perf improvements --- .../workers/2025-06-05-open-next-size.mdx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/content/changelog/workers/2025-06-05-open-next-size.mdx diff --git a/src/content/changelog/workers/2025-06-05-open-next-size.mdx b/src/content/changelog/workers/2025-06-05-open-next-size.mdx new file mode 100644 index 000000000000000..a3da4b9efaa6f3e --- /dev/null +++ b/src/content/changelog/workers/2025-06-05-open-next-size.mdx @@ -0,0 +1,25 @@ +--- +title: Performance and size optimization for the Cloudflare adapter for Open Next. +description: Update to the latest version of `@opennextjs/cloudflare` to automatically benefit from these improvements. +products: + - workers +date: 2025-06-05T19:00:00Z + +--- + +We released the Cloudflare adapter for Open Next v1.0.0 in May 2025. + +We had plans [to improve performance and size](https://blog.cloudflare.com/deploying-nextjs-apps-to-cloudflare-workers-with-the-opennext-adapter/#1-0-and-the-road-ahead) after v1 was released. + +`@opennextjs/cloudflare` v1.2 released on June 5, 2025 contains a few improvements: + +- `babel` was pulled into the app code, we [remove it](https://github.com/opennextjs/opennextjs-cloudflare/pull/710) to save ~4MB on a typical uncompressed app size +- we were also able [to drop a dependency on `@ampproject/toolbox-optimizer`](https://github.com/opennextjs/opennextjs-cloudflare/pull/700) to save ~3MB on a typical uncompressed app size +- we [stopped preloading all the app routes](https://github.com/opennextjs/opennextjs-cloudflare/pull/696) to save >100ms on the first request. + +Users only need to update to the latest version of `@opennextjs/cloudflare` to automatically benefit from these improvements. + +Note that we published [CVE-2005-6087](https://github.com/opennextjs/opennextjs-cloudflare/security/advisories/GHSA-rvpw-p7vw-wj3m) for a SSRF vulnerability in the `@opennextjs/cloudflare` package. +The vulnerability has been fixed from `@opennextjs/cloudflare` v1.3.0 onwards. Please update to any version after this one. v1.3.1 is the latest at the time of writing. + + From e845e899b98126ac072029bdaff7387ebf276d7d Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Fri, 27 Jun 2025 11:12:15 +0200 Subject: [PATCH 02/10] add a changelog entry about Open Next perf improvements From aead86b9bd558a45329edc549c4728fe07419f0b Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 7 Jul 2025 09:40:21 +0200 Subject: [PATCH 03/10] Update src/content/changelog/workers/2025-06-05-open-next-size.mdx Co-authored-by: lrapoport-cf <107272160+lrapoport-cf@users.noreply.github.com> --- src/content/changelog/workers/2025-06-05-open-next-size.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/workers/2025-06-05-open-next-size.mdx b/src/content/changelog/workers/2025-06-05-open-next-size.mdx index a3da4b9efaa6f3e..0f0d3bffc535ca0 100644 --- a/src/content/changelog/workers/2025-06-05-open-next-size.mdx +++ b/src/content/changelog/workers/2025-06-05-open-next-size.mdx @@ -1,5 +1,5 @@ --- -title: Performance and size optimization for the Cloudflare adapter for Open Next. +title: Performance and size optimization for the Cloudflare adapter for Open Next description: Update to the latest version of `@opennextjs/cloudflare` to automatically benefit from these improvements. products: - workers From debbc71ae395d0d4d4128bcbf140d78844334e0e Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 7 Jul 2025 09:40:36 +0200 Subject: [PATCH 04/10] Update src/content/changelog/workers/2025-06-05-open-next-size.mdx Co-authored-by: lrapoport-cf <107272160+lrapoport-cf@users.noreply.github.com> --- src/content/changelog/workers/2025-06-05-open-next-size.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/content/changelog/workers/2025-06-05-open-next-size.mdx b/src/content/changelog/workers/2025-06-05-open-next-size.mdx index 0f0d3bffc535ca0..c7349ca44f27980 100644 --- a/src/content/changelog/workers/2025-06-05-open-next-size.mdx +++ b/src/content/changelog/workers/2025-06-05-open-next-size.mdx @@ -7,9 +7,7 @@ date: 2025-06-05T19:00:00Z --- -We released the Cloudflare adapter for Open Next v1.0.0 in May 2025. - -We had plans [to improve performance and size](https://blog.cloudflare.com/deploying-nextjs-apps-to-cloudflare-workers-with-the-opennext-adapter/#1-0-and-the-road-ahead) after v1 was released. +With the release of the Cloudflare adapter for Open Next v1.0.0 in May 2025, we already had followups plans [to improve performance and size](https://blog.cloudflare.com/deploying-nextjs-apps-to-cloudflare-workers-with-the-opennext-adapter/#1-0-and-the-road-ahead). `@opennextjs/cloudflare` v1.2 released on June 5, 2025 contains a few improvements: From 512b04181900370261a38ee5fbeb3e330a7c16ff Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 7 Jul 2025 09:40:50 +0200 Subject: [PATCH 05/10] Update src/content/changelog/workers/2025-06-05-open-next-size.mdx Co-authored-by: lrapoport-cf <107272160+lrapoport-cf@users.noreply.github.com> --- src/content/changelog/workers/2025-06-05-open-next-size.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/workers/2025-06-05-open-next-size.mdx b/src/content/changelog/workers/2025-06-05-open-next-size.mdx index c7349ca44f27980..a9ccb600de77121 100644 --- a/src/content/changelog/workers/2025-06-05-open-next-size.mdx +++ b/src/content/changelog/workers/2025-06-05-open-next-size.mdx @@ -9,7 +9,7 @@ date: 2025-06-05T19:00:00Z With the release of the Cloudflare adapter for Open Next v1.0.0 in May 2025, we already had followups plans [to improve performance and size](https://blog.cloudflare.com/deploying-nextjs-apps-to-cloudflare-workers-with-the-opennext-adapter/#1-0-and-the-road-ahead). -`@opennextjs/cloudflare` v1.2 released on June 5, 2025 contains a few improvements: +`@opennextjs/cloudflare` v1.2 released on June 5, 2025 delivers on these enhancements with the following: - `babel` was pulled into the app code, we [remove it](https://github.com/opennextjs/opennextjs-cloudflare/pull/710) to save ~4MB on a typical uncompressed app size - we were also able [to drop a dependency on `@ampproject/toolbox-optimizer`](https://github.com/opennextjs/opennextjs-cloudflare/pull/700) to save ~3MB on a typical uncompressed app size From 4cc7a79cd81e932c87197f840b3ca2f7d1d94cad Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 7 Jul 2025 09:41:04 +0200 Subject: [PATCH 06/10] Update src/content/changelog/workers/2025-06-05-open-next-size.mdx Co-authored-by: lrapoport-cf <107272160+lrapoport-cf@users.noreply.github.com> --- src/content/changelog/workers/2025-06-05-open-next-size.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/workers/2025-06-05-open-next-size.mdx b/src/content/changelog/workers/2025-06-05-open-next-size.mdx index a9ccb600de77121..e46ae769f7ea8ce 100644 --- a/src/content/changelog/workers/2025-06-05-open-next-size.mdx +++ b/src/content/changelog/workers/2025-06-05-open-next-size.mdx @@ -11,7 +11,7 @@ With the release of the Cloudflare adapter for Open Next v1.0.0 in May 2025, we `@opennextjs/cloudflare` v1.2 released on June 5, 2025 delivers on these enhancements with the following: -- `babel` was pulled into the app code, we [remove it](https://github.com/opennextjs/opennextjs-cloudflare/pull/710) to save ~4MB on a typical uncompressed app size +- We [removed `babel` from the app code](https://github.com/opennextjs/opennextjs-cloudflare/pull/710) to save ~4MB on a typical uncompressed app size - we were also able [to drop a dependency on `@ampproject/toolbox-optimizer`](https://github.com/opennextjs/opennextjs-cloudflare/pull/700) to save ~3MB on a typical uncompressed app size - we [stopped preloading all the app routes](https://github.com/opennextjs/opennextjs-cloudflare/pull/696) to save >100ms on the first request. From 53ac633b755afe9108691accdb33c1446da58834 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 7 Jul 2025 09:41:14 +0200 Subject: [PATCH 07/10] Update src/content/changelog/workers/2025-06-05-open-next-size.mdx Co-authored-by: lrapoport-cf <107272160+lrapoport-cf@users.noreply.github.com> --- src/content/changelog/workers/2025-06-05-open-next-size.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/workers/2025-06-05-open-next-size.mdx b/src/content/changelog/workers/2025-06-05-open-next-size.mdx index e46ae769f7ea8ce..094102fc54c8363 100644 --- a/src/content/changelog/workers/2025-06-05-open-next-size.mdx +++ b/src/content/changelog/workers/2025-06-05-open-next-size.mdx @@ -12,7 +12,7 @@ With the release of the Cloudflare adapter for Open Next v1.0.0 in May 2025, we `@opennextjs/cloudflare` v1.2 released on June 5, 2025 delivers on these enhancements with the following: - We [removed `babel` from the app code](https://github.com/opennextjs/opennextjs-cloudflare/pull/710) to save ~4MB on a typical uncompressed app size -- we were also able [to drop a dependency on `@ampproject/toolbox-optimizer`](https://github.com/opennextjs/opennextjs-cloudflare/pull/700) to save ~3MB on a typical uncompressed app size +- We were also able [to drop a dependency on `@ampproject/toolbox-optimizer`](https://github.com/opennextjs/opennextjs-cloudflare/pull/700) to save ~3MB on a typical uncompressed app size - we [stopped preloading all the app routes](https://github.com/opennextjs/opennextjs-cloudflare/pull/696) to save >100ms on the first request. Users only need to update to the latest version of `@opennextjs/cloudflare` to automatically benefit from these improvements. From e789ce687b87b9eae6f76a4574d9a2228dd41566 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 7 Jul 2025 09:41:23 +0200 Subject: [PATCH 08/10] Update src/content/changelog/workers/2025-06-05-open-next-size.mdx Co-authored-by: lrapoport-cf <107272160+lrapoport-cf@users.noreply.github.com> --- src/content/changelog/workers/2025-06-05-open-next-size.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/workers/2025-06-05-open-next-size.mdx b/src/content/changelog/workers/2025-06-05-open-next-size.mdx index 094102fc54c8363..56976ec39f37768 100644 --- a/src/content/changelog/workers/2025-06-05-open-next-size.mdx +++ b/src/content/changelog/workers/2025-06-05-open-next-size.mdx @@ -13,7 +13,7 @@ With the release of the Cloudflare adapter for Open Next v1.0.0 in May 2025, we - We [removed `babel` from the app code](https://github.com/opennextjs/opennextjs-cloudflare/pull/710) to save ~4MB on a typical uncompressed app size - We were also able [to drop a dependency on `@ampproject/toolbox-optimizer`](https://github.com/opennextjs/opennextjs-cloudflare/pull/700) to save ~3MB on a typical uncompressed app size -- we [stopped preloading all the app routes](https://github.com/opennextjs/opennextjs-cloudflare/pull/696) to save >100ms on the first request. +- We [stopped preloading all the app routes](https://github.com/opennextjs/opennextjs-cloudflare/pull/696) to save >100ms on the first request. Users only need to update to the latest version of `@opennextjs/cloudflare` to automatically benefit from these improvements. From da0567a38a9e9b88c7abefcda8d458570c31461b Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Fri, 1 Aug 2025 16:54:34 +0200 Subject: [PATCH 09/10] fixup! upate --- .../changelog/workers/2025-06-05-open-next-size.mdx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/content/changelog/workers/2025-06-05-open-next-size.mdx b/src/content/changelog/workers/2025-06-05-open-next-size.mdx index 56976ec39f37768..57a9536433d35d3 100644 --- a/src/content/changelog/workers/2025-06-05-open-next-size.mdx +++ b/src/content/changelog/workers/2025-06-05-open-next-size.mdx @@ -4,20 +4,15 @@ description: Update to the latest version of `@opennextjs/cloudflare` to automat products: - workers date: 2025-06-05T19:00:00Z - --- With the release of the Cloudflare adapter for Open Next v1.0.0 in May 2025, we already had followups plans [to improve performance and size](https://blog.cloudflare.com/deploying-nextjs-apps-to-cloudflare-workers-with-the-opennext-adapter/#1-0-and-the-road-ahead). -`@opennextjs/cloudflare` v1.2 released on June 5, 2025 delivers on these enhancements with the following: +`@opennextjs/cloudflare` v1.2 released on June 5, 2025 delivers on these enhancements. By removing `babel` from the app code and dropping a dependency on `@ampproject/toolbox-optimizer`, we were able to reduce generated bundle sizes. Additionally, by stopping preloading of all app routes, we were able to improve the cold start time. -- We [removed `babel` from the app code](https://github.com/opennextjs/opennextjs-cloudflare/pull/710) to save ~4MB on a typical uncompressed app size -- We were also able [to drop a dependency on `@ampproject/toolbox-optimizer`](https://github.com/opennextjs/opennextjs-cloudflare/pull/700) to save ~3MB on a typical uncompressed app size -- We [stopped preloading all the app routes](https://github.com/opennextjs/opennextjs-cloudflare/pull/696) to save >100ms on the first request. +This means that users will now see a decrease from 14 to 8MiB (2.3 to 1.6MiB gzipped) in generated bundle size for a Next app created via create-next-app, and typically 100ms faster startup times for their medium-sized apps. Users only need to update to the latest version of `@opennextjs/cloudflare` to automatically benefit from these improvements. Note that we published [CVE-2005-6087](https://github.com/opennextjs/opennextjs-cloudflare/security/advisories/GHSA-rvpw-p7vw-wj3m) for a SSRF vulnerability in the `@opennextjs/cloudflare` package. -The vulnerability has been fixed from `@opennextjs/cloudflare` v1.3.0 onwards. Please update to any version after this one. v1.3.1 is the latest at the time of writing. - - +The vulnerability has been fixed from `@opennextjs/cloudflare` v1.3.0 onwards. Please update to any version after this one. v1.6.2 is the latest at the time of writing. From 20722d362eb0195388ebaffbf79cf6c203ff058e Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Fri, 1 Aug 2025 20:42:46 +0200 Subject: [PATCH 10/10] Update src/content/changelog/workers/2025-06-05-open-next-size.mdx Co-authored-by: lrapoport-cf <107272160+lrapoport-cf@users.noreply.github.com> --- src/content/changelog/workers/2025-06-05-open-next-size.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/workers/2025-06-05-open-next-size.mdx b/src/content/changelog/workers/2025-06-05-open-next-size.mdx index 57a9536433d35d3..9ef4b0c58e3dbf6 100644 --- a/src/content/changelog/workers/2025-06-05-open-next-size.mdx +++ b/src/content/changelog/workers/2025-06-05-open-next-size.mdx @@ -15,4 +15,4 @@ This means that users will now see a decrease from 14 to 8MiB (2.3 to 1.6MiB gzi Users only need to update to the latest version of `@opennextjs/cloudflare` to automatically benefit from these improvements. Note that we published [CVE-2005-6087](https://github.com/opennextjs/opennextjs-cloudflare/security/advisories/GHSA-rvpw-p7vw-wj3m) for a SSRF vulnerability in the `@opennextjs/cloudflare` package. -The vulnerability has been fixed from `@opennextjs/cloudflare` v1.3.0 onwards. Please update to any version after this one. v1.6.2 is the latest at the time of writing. +The vulnerability has been fixed from `@opennextjs/cloudflare` v1.3.0 onwards. Please update to any version after this one. v1.6.3 is the latest at the time of writing.