Skip to content

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Aug 4, 2025

The former patch of next server is not enough.

The code was changed sometimes in Next 15.

We should upstream that to aws.

Before (e2e/experimental)

image

After

image

/cc @conico974 @sommeeeer

@vicb vicb requested review from conico974 and sommeeeer August 4, 2025 20:19
Copy link

changeset-bot bot commented Aug 4, 2025

🦋 Changeset detected

Latest commit: 44194a9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@opennextjs/cloudflare Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Aug 4, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/cloudflare@843

commit: 44194a9

Copy link
Collaborator

@sommeeeer sommeeeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, does this get rid of that pesky switch case warning? Should you only apply it on Next >= 15.4?

@vicb
Copy link
Contributor Author

vicb commented Aug 4, 2025

LGTM, does this get rid of that pesky switch case warning?

Yes, that warning is removed.

Should you only apply it on Next >= 15.4?

I think somebody reported it for 15.3.<I don't remember what> last week

@vicb
Copy link
Contributor Author

vicb commented Aug 4, 2025

Should you only apply it on Next >= 15.4?

I think somebody reported it for 15.3.<I don't remember what> last week

actually it was 15.2.5

@vicb
Copy link
Contributor Author

vicb commented Aug 4, 2025

Oh and thanks for another review 🙏

@vicb vicb merged commit 10fc603 into main Aug 4, 2025
7 checks passed
@vicb vicb deleted the vicb/babel-again branch August 4, 2025 20:45
Copy link
Collaborator

@conico974 conico974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! And yeah we should add it to aws as well

@conico974
Copy link
Collaborator

You guys are too fast 😄

@LubomirGeorgiev
Copy link

LubomirGeorgiev commented Aug 5, 2025

@vicb

This helped a lot. It significantly reduced the worker size.

Before:
Total Upload: 25229.97 KiB / gzip: 6136.94 KiB

After:
Total Upload: 22279.11 KiB / gzip: 5475.65 KiB

Do you have in mind other similar optimizations like this one?

vicb added a commit that referenced this pull request Sep 1, 2025
`patchNodeEnvironment` was introduced in #843 to drop the babel dependency.
It was upstream into aws via opennextjs/opennextjs-aws#948.
This PR drops the local version to use the upstream version.
vicb added a commit that referenced this pull request Sep 1, 2025
`patchNodeEnvironment` was introduced in #843 to drop the babel dependency.
It was upstream into aws via opennextjs/opennextjs-aws#948.
This PR drops the local version to use the upstream version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants