Skip to content

fix(nextjs): Only include emitted chunk directories in Turbopack sourcemap upload - #24259

Merged
chargome merged 1 commit into
developfrom
guard-static-chunks-check
Sep 10, 2026
Merged

fix(nextjs): Only include emitted chunk directories in Turbopack sourcemap upload#24259
chargome merged 1 commit into
developfrom
guard-static-chunks-check

Conversation

@chargome

@chargome chargome commented Sep 9, 2026

Copy link
Copy Markdown
Member

Turbopack builds with supportsImmutableAssets only emit static/immutable/chunks, but the after-production-compile-turbopack asset list still added static/chunks unconditionally, so the sourcemap upload logged Directory '.next/static/chunks' does not exist on Vercel.

This guards static/chunks with the same existsSync check that #21978 added for the immutable path, so only directories Turbopack actually emitted are uploaded.

closes https://linear.app/getsentry/issue/JS-3641

…cemap upload

Turbopack builds with supportsImmutableAssets only emit static/immutable/chunks,
but the after-production-compile-turbopack asset list added static/chunks
unconditionally, so the sourcemap upload logged a missing-directory error.
Guard static/chunks with the same existsSync check used for the immutable path.

Refs JS-3641
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chargome chargome self-assigned this Sep 9, 2026
@chargome

chargome commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@linear-code

linear-code Bot commented Sep 9, 2026

Copy link
Copy Markdown

JS-3641

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.81 kB +0.04% +11 B 🔺
@sentry/browser - with treeshaking flags 27.12 kB +0.04% +10 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 27.01 kB +0.03% +7 B 🔺
@sentry/browser (incl. Tracing) 49.27 kB +0.12% +57 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 49.28 kB +0.12% +57 B 🔺
@sentry/browser (incl. Tracing, Profiling) 52.21 kB +0.17% +84 B 🔺
@sentry/browser (incl. Tracing, Replay) 88.81 kB +0.05% +44 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.99 kB +0.05% +33 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 93.49 kB +0.06% +51 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 106.44 kB +0.07% +67 B 🔺
@sentry/browser (incl. Feedback) 46.3 kB +0.02% +5 B 🔺
@sentry/browser (incl. sendFeedback) 33.87 kB +0.02% +6 B 🔺
@sentry/browser (incl. FeedbackAsync) 38.99 kB +0.04% +13 B 🔺
@sentry/browser (incl. Metrics) 29.84 kB +0.08% +23 B 🔺
@sentry/browser (incl. Logs) 30.1 kB +0.06% +18 B 🔺
@sentry/browser (incl. Metrics & Logs) 30.78 kB +0.11% +31 B 🔺
@sentry/react 30.57 kB +0.05% +14 B 🔺
@sentry/react (incl. Tracing) 51.64 kB +0.16% +78 B 🔺
@sentry/vue 36.07 kB +0.05% +17 B 🔺
@sentry/vue (incl. Tracing) 51.56 kB +0.16% +82 B 🔺
@sentry/svelte 28.85 kB +0.06% +15 B 🔺
CDN Bundle 30.56 kB +0.05% +15 B 🔺
CDN Bundle (incl. Tracing) 49.81 kB +0.15% +73 B 🔺
CDN Bundle (incl. Logs, Metrics) 32.83 kB +0.03% +9 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 51.77 kB +0.14% +71 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 73.48 kB -0.01% -4 B 🔽
CDN Bundle (incl. Tracing, Replay) 87.35 kB +0.08% +63 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.26 kB +0.1% +82 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 93.28 kB +0.07% +59 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.27 kB +0.07% +65 B 🔺
CDN Bundle - uncompressed 90.47 kB +0.01% +8 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 148.36 kB +0.13% +189 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.04 kB +0.01% +8 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.32 kB +0.13% +189 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.3 kB +0.01% +8 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.95 kB +0.08% +189 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.9 kB +0.07% +189 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.65 kB +0.07% +189 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.59 kB +0.07% +189 B 🔺
@sentry/nextjs (client) 54.09 kB +0.16% +84 B 🔺
@sentry/sveltekit (client) 49.73 kB +0.15% +71 B 🔺
@sentry/core/server 36.99 kB - -
@sentry/core/browser 13.55 kB - -
@sentry/node 127.95 kB +0.13% +158 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.61 kB - -
@sentry/node - without tracing 88.73 kB +0.03% +21 B 🔺
@sentry/node - without channel injection 107.16 kB +0.13% +135 B 🔺
@sentry/aws-serverless 97.12 kB +0.03% +27 B 🔺
@sentry/cloudflare (withSentry) - minified 202.05 kB +0.04% +74 B 🔺
@sentry/cloudflare (withSentry) 502.91 kB +0.05% +232 B 🔺

View base workflow run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ffd6a0c. Configure here.

@chargome
chargome marked this pull request as ready for review September 9, 2026 16:28
@chargome
chargome requested a review from a team as a code owner September 9, 2026 16:28
@chargome
chargome requested review from andreiborza, nicohrubec and s1gr1d and removed request for a team September 9, 2026 16:28
@chargome

chargome commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@andreiborza this fixes the build error message in changelog

@chargome
chargome merged commit 4e2fa6b into develop Sep 10, 2026
88 checks passed
@chargome
chargome deleted the guard-static-chunks-check branch September 10, 2026 10:50
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.

2 participants