Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add paths tag for questions regarding tsconfig paths not working #38

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions data/tags/paths.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
question: How to use tsconfig paths?
keywords:
- "paths"
- "baseUrl"
- "magic"
---

The `paths` and `baseUrl` compiler options don't cause any remapping of imports paths, they only inform TS of existing mappings, which you'll have to setup with some other tool.

`baseUrl` is a pretty well-supported option (e.g. using the `NODE_PATH` environment variable with node or `resolve.modules` with webpack).
`paths` can be trickier to setup, (see [this](https://nodejs.org/api/packages.html#packages_subpath_imports)), and you may find it to not be worth the effort.
Loading