Skip to content

nextjs: Inject moduleMetadata on Turbopack builds #23402

Open

Description

@chargome

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.

Activity

  1. self-assigned this
    on Aug 13, 2026
  2. linear-code commented on Aug 13, 2026

    @linear-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions