Skip to content

[Blocked on AWS fix and release] fix: bump aws for package.json#imports tracing#1231

Draft
james-elicx wants to merge 8 commits intomainfrom
james/patch-aws-trace-mathjax
Draft

[Blocked on AWS fix and release] fix: bump aws for package.json#imports tracing#1231
james-elicx wants to merge 8 commits intomainfrom
james/patch-aws-trace-mathjax

Conversation

@james-elicx
Copy link
Copy Markdown
Collaborator

@james-elicx james-elicx commented Apr 24, 2026

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 24, 2026

🦋 Changeset detected

Latest commit: 6ac03c1

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 24, 2026

Open in StackBlitz

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

commit: 6ac03c1

@314systems
Copy link
Copy Markdown
Contributor

It works!
However, the bundle size has increased.

Before: Total Upload: 12201.37 KiB / gzip: 2761.87 KiB
After:  Total Upload: 22064.88 KiB / gzip: 4437.63 KiB

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Apr 24, 2026

It works! However, the bundle size has increased.

Before: Total Upload: 12201.37 KiB / gzip: 2761.87 KiB
After:  Total Upload: 22064.88 KiB / gzip: 4437.63 KiB

We need to figure out if this is specific to your app - maybe it was not working because of missing files and they have to be included. In that case this fix would work as intended.

But we should make sure it doesn't negatively affect other apps.

@james-elicx any thoughts on this?

@james-elicx
Copy link
Copy Markdown
Collaborator Author

I ran all the builds and put the before / after sizes into a table. The only notable size difference is adding mathjax to the playground16 app.

Webpack

App Upload (before) Upload (after) Δ Upload Gzip (before) Gzip (after) Δ Gzip
gh-119 4.07 MiB 4.06 MiB -10.24 KiB (-0.25%) 868.78 KiB 869.98 KiB +1.20 KiB (+0.14%)
gh-219 4.22 MiB 4.22 MiB 0 891.10 KiB 892.51 KiB +1.41 KiB (+0.16%)
gh-223 5.53 MiB 5.52 MiB -10.24 KiB (-0.18%) 1.12 MiB 1.12 MiB 0
create-next-app 4.07 MiB 4.07 MiB 0 872.99 KiB 871.30 KiB -1.69 KiB (-0.19%)
app-pages-router 6.45 MiB 6.43 MiB -20.48 KiB (-0.31%) 1.40 MiB 1.40 MiB 0
app-router 8.58 MiB 8.56 MiB -20.48 KiB (-0.23%) 2.02 MiB 2.03 MiB +10.24 KiB (+0.50%)
experimental 6.02 MiB 6.01 MiB -10.24 KiB (-0.17%) 1.26 MiB 1.25 MiB -10.24 KiB (-0.79%)
pages-router 4.54 MiB 4.54 MiB 0 1.01 MiB 1.01 MiB 0
middleware 4.52 MiB 4.52 MiB 0 952.51 KiB 951.60 KiB -0.91 KiB (-0.10%)
next-partial-prerendering 3.67 MiB 3.67 MiB 0 905.72 KiB 905.36 KiB -0.36 KiB (-0.04%)
d1-tag-next 4.65 MiB 4.65 MiB 0 986.00 KiB 985.85 KiB -0.15 KiB (-0.02%)
kv-tag-next 4.65 MiB 4.65 MiB 0 986.04 KiB 985.89 KiB -0.15 KiB (-0.02%)
memory-queue 4.42 MiB 4.42 MiB 0 939.43 KiB 939.31 KiB -0.12 KiB (-0.01%)
r2-incremental-cache 4.45 MiB 4.45 MiB 0 946.58 KiB 946.46 KiB -0.12 KiB (-0.01%)
static-assets-incremental-cache 4.63 MiB 4.63 MiB 0 981.43 KiB 981.32 KiB -0.11 KiB (-0.01%)
playground14 5.71 MiB 5.71 MiB 0 1.56 MiB 1.56 MiB 0
playground15 6.97 MiB 6.95 MiB -20.48 KiB (-0.29%) 1.68 MiB 1.69 MiB +10.24 KiB (+0.60%)
playground16 14.19 MiB 15.90 MiB +1.71 MiB (+12.05%) 2.63 MiB 3.13 MiB +512 KiB (+19.01%)
prisma-next-app 6.72 MiB 6.71 MiB -10.24 KiB (-0.15%) 1.78 MiB 1.78 MiB 0
ssg-app 4.19 MiB 4.19 MiB 0 886.65 KiB 886.30 KiB -0.35 KiB (-0.04%)
vercel-blog-starter 4.43 MiB 4.43 MiB 0 942.92 KiB 942.58 KiB -0.34 KiB (-0.04%)

Turbopack

App Upload (before) Upload (after) Δ Upload Gzip (before) Gzip (after) Δ Gzip
app-pages-router 6.63 MiB 6.63 MiB 0 1.46 MiB 1.46 MiB 0
app-router 9.33 MiB 9.33 MiB 0 2.19 MiB 2.19 MiB 0
pages-router 4.54 MiB 4.53 MiB -10.24 KiB (-0.22%) 1.01 MiB 1.01 MiB 0
playground16 14.22 MiB 15.93 MiB +1.71 MiB (+12.02%) 2.64 MiB 3.14 MiB +512 KiB (+18.94%)

@james-elicx
Copy link
Copy Markdown
Collaborator Author

Any difference you're seeing will likely be legitimate changes based on the above tables.

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Apr 24, 2026

Maybe it would we worth investigating why playground16 is +20%. WDYT?

@james-elicx
Copy link
Copy Markdown
Collaborator Author

It's jumped because I added a reproduction for the issue with the library in question. If I remove the repro, there's no change.

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Apr 25, 2026

It's jumped because I added a reproduction for the issue with the library in question. If I remove the repro, there's no change.

Thanks a lot again for looking into this.
I'll take a deeper and let's aim to merge on Monday.

@james-elicx james-elicx force-pushed the james/patch-aws-trace-mathjax branch from 4c4817a to 4549dcb Compare April 28, 2026 09:55
@vicb vicb changed the title fix: bump aws for package.json#imports tracing [Blocked on AWS fix and release] fix: bump aws for package.json#imports tracing Apr 28, 2026
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.

[BUG] Turbopack patch: discoverBareExternalImports breaks builds for packages using Node.js subpath imports (e.g. MathJax)

3 participants