Skip to content

nitro/vite strips mappings when generating sourcemaps #3826

Closed

Description

@kevinehosford

Environment

node: v22.16.0
[email protected]

Reproduction

https://github.com/kevinehosford/nitro-tss-sourcemaps

Describe the bug

I notice that when enabling sourcemaps, the maps produced for the nitro build have an empty mappings:"" property. I was not expecting the mappings to be empty when producing sourcemaps.

If I add experimental: { sourcemapMinify: false } to the config then the property is not empty.

Additional context

No response

Logs

Activity

  1. added
    pending triage
    on Dec 1, 2025
  2. pi0 commented on Dec 1, 2025

    @pi0
    Member

    This is kinda expected current behavior. Previously this workaround worked well because dependency chunks were seperated but now they are not it is a problem.

    We likely have to removal mappings removal bits till supporting full parse and tree-shake.

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

    pending triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions