Skip to content

Bug: Path Not Transformed If Already Resolvable #190

Open
@Char2sGu

Description

Let's say @workspace/lib is a package in a loal NPM Workspace.
By default, imports will be resolved to node_modules/@workspace/lib, but we can change its resolution by defining the following path mapping:

"paths": {
  "@workspace/lib": "./dist/lib"
}

By doing so, TypeScript will always resolve the path @workspace/lib to {workspaceRoot}/dist/lib instead of {workspaceRoot}/node_modules/@workspace/lib, but this behavior doesn't seem respected in this library: In such case, the path mapping does not take effect, and the path @workspace/lib is not transformed at all.

I will be happy to provide a reproduction repository if you find the above information not descriptive enough.

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions