Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.

Conversation

@hanayashiki
Copy link
Contributor

This PR should close #8

The main logic is added to loader.resolve, where we use the resolved tsconfig to map the "absolute path" to real path.

Note that typescript considers path mapping to have the highest precedence compared to node resolution rule, the added logic should be added at the beginning of loader.resolve. However, since this is how typescript behaves, this change is breaking, but shouldn't affect too many users.

Plus, I modified extensionsRegex to support .mts extension, following the latest change in TypeScript 4.5.

Tests are added to test/tsconfig-paths.

@antfu
Copy link
Owner

antfu commented Nov 3, 2021

Generally, it LGTM 👍. Can you help on checking the issue on Windows?

@hanayashiki
Copy link
Contributor Author

Generally, it LGTM 👍. Can you help on checking the issue on Windows?

Oops, but I currently don't own a windows. It seems the path in the shell command can't include the disk symbol, but I'm not able to run a full test. I have already fixed that using relativize in entry.ts.

@antfu
Copy link
Owner

antfu commented Nov 3, 2021

It's passing. Thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tsconfig paths support?

2 participants