Skip to content

fix(dts): preserve importer if resolved to node_modules folder#1115

Merged
Timeless0911 merged 1 commit intomainfrom
fix/should-keep-node-modules
Jul 15, 2025
Merged

fix(dts): preserve importer if resolved to node_modules folder#1115
Timeless0911 merged 1 commit intomainfrom
fix/should-keep-node-modules

Conversation

@Timeless0911
Copy link
Copy Markdown
Contributor

@Timeless0911 Timeless0911 commented Jul 15, 2025

Summary

Usually developers will unify the versions of related types and solve the problem of multiple instances by writing the following in the paths of tsconfig.json. In this case, we do not need to redirect it to ../node_modules/foo, just keep the original request.

{
  "compilerOptions": {
    "paths": {
      "foo": ["./node_modules/foo"],
      "bar": ["./node_modules/@types/bar"],
    }
  },
}

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@Timeless0911 Timeless0911 merged commit 4d95a86 into main Jul 15, 2025
16 checks passed
@Timeless0911 Timeless0911 deleted the fix/should-keep-node-modules branch July 15, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants