Skip to content

[@rollup/plugin-typescript] unable to generate source map sources correctly #1861

Closed

Description

@startracex

Expected Behavior

The src directory should exist once, such as src/index.ts.

Actual Behavior

The sources in the generated sourcemap points to the wrong path, duplicating the src directory. such as src/src/index.ts.

Additional Information

This happens when the output directory contains the input directory. The example is output from ./src to ..

Activity

  1. stale commented on Jul 19, 2025

    @stale

    Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it. ⓘ

  2. satouriko commented on Aug 6, 2025

    @satouriko

    Not stale

  3. satouriko commented on Aug 6, 2025

    @satouriko

    The source map sources gets wrong values whenever the output dir is not the same level as "dist", deeper or shallower.

    In this example output dir is dist/pkg, sourcemaps in which points sources to ../../../src/, while should be ../../src/
    https://stackblitz.com/edit/stackblitz-starters-crsdy3rp

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions