-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(es/loader): Make tsc
resolver work for bare specifier
#8550
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
swc-bump:
- swc_ecma_loader
tsc
resolver work for bare specifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
swc-bump:
- swc_ecma_loader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated review comment generated by auto-rebase script
Description:
From the typescript baseUrl doc: When using bare specifiers (module specifiers that don’t begin with ./, ../, or /), baseUrl has a higher precedence than node_modules package lookups.
In the current tsc resolver implementation, when resolving bare module specifiers, baseUrl was not used except for
paths
, this cause the belowing resolution failed, but it worked when used in typescript project.tsconfig.json
/.swcrc
:File structure:
./src/index.ts content:
BREAKING CHANGE:
Related issue (if exists):