getsentry / getsentry/sentry-javascript

nextjs: Inject moduleMetadata on Turbopack builds

Aperta
#23,402 1 commento 0 reazioni 1 assegnatario Rivendicata da @chargome Vedi su GitHub
Lingua principale
TypeScript
Stelle
8.7k
Fork
1.8k
Merge medio
1g 17h
PR unite (30g)
515

Descrizione

`moduleMetadata` only reaches the webpack plugin. On Turbopack builds it has no effect — #23372 added a build-time warning and documented it as webpack-only rather than leaving it a silent no-op.

The Turbopack loader (`moduleMetadataInjectionLoader`) already does the injection, but hardcodes the `applicationKey` payload. To close the gap: merge arbitrary metadata alongside the `applicationKey` tag, resolve the `ModuleMetadataCallback` form (`releaseName` is already resolved in `getFinalConfigObject.ts` and needs threading through), and widen the loader gate to `applicationKey || moduleMetadata`. Then drop the warning and the JSDoc note.

Touches the default bundler path for Next.js 16+, so it wants e2e coverage.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.