Skip to content

tsconfig paths resolution broken when using references: 'auto #221

Closed

Description

@arkadiusz-swierczek-pm

Description

Path alias resolution via tsconfig.json paths stopped working when upgrading from 1.11.0 to 1.12.2. The resolver returns no path for aliased specifiers (e.g. $/utils/helper) when references: 'auto' is set and the main tsconfig.json has a references array pointing to another tsconfig.

Relative imports (./utils/helper) still resolve correctly in both versions.

Reproduction

Minimal reproduction repo: https://github.com/arkadiusz-swierczek-pm/unrs-resolver-error

npm ci
node main.js

Setup

tsconfig.json — defines a $/* path alias and references tsconfig.node.json:

{
  "compilerOptions": {
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "paths": { "$/*": ["./src/*"] }
  },
  "include": ["src"],
  "references": [{ "path": "./tsconfig.node.json" }]
}

Resolver options:

const resolverOpts = {
  tsconfig: {
    configFile: 'tsconfig.json',
    references: 'auto',
  },
  extensions: ['.ts', '.tsx', '.js', '.jsx'],
};

Expected behavior

"$/utils/helper" → /path/to/test/src/utils/helper.ts

Actual behavior

Specifier v1.11.0 v1.12.2
$/utils/helper Resolves correctly no path
./utils/helper Resolves correctly Resolves correctly

Versions

Activity

  1. spdaley commented on Sep 3, 2026

    @spdaley

    Any thoughts on this? It looks like we may be impacted by this as well since we upgraded to jest 30.5 which included a bump to v1.12.1+

  2. JounQin commented on Sep 3, 2026

    @JounQin
    Member

    Sorry I didn't notice this issue previously, I'll try to fix it ASAP when I'm free enough.

  3. self-assigned this
    on Sep 3, 2026
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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions