Skip to content

fix(nuxt): Nuxt 5 server source maps have no sourcesContent #25322

Open

Description

@s1gr1d

On Nuxt 5 (Nitro 3), the server source maps that Sentry uploads have no sourcesContent. So Sentry cannot show the source code for server frames.

Root cause

Nitro 3 has an option experimental.sourcemapMinify. It is on by default when source maps are enabled. Nitro's nitro:sourcemap plugin then does two things in generateBundle:

  • It deletes sourcesContent from every server map.
  • It clears mappings for maps whose sources are all in node_modules.

The module sets sourcemapExcludeSources: false, but this has no effect: nitro:sourcemap deletes the content after Rolldown writes it.

Possible fix

Set nitro.experimental.sourcemapMinify: false when the user has not set it. The TanStack Start SDK does the same (see the TanStack Start Nitro source map PR). We still have to confirm that the Nitro 3 build that Nuxt 5 uses reads the option from there.

Tests

In dev-packages/e2e-tests/test-applications/nuxt-5-sourcemaps/assert-build.ts, enable the SERVER_MARKER assertion again.

Activity

  1. linear-code commented on Oct 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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions