-
Notifications
You must be signed in to change notification settings - Fork 27
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
1699674 - Fix support for ES6 importing #123
Conversation
This is a very weird change, I know, but there is good reason behind it: 1. ESM resolution algorithm does not currently support automatic resolution of file extensions and does not have the hability to import directories that have an index file. The extension and the name of the file being import need to _always_ be spcified. See: https://nodejs.org/api/esm.html#esm_customizing_esm_specifier_resolution_algorithm 2. Typescript does not provide features that change compiled JS code. This means there is no Typescript feature to include the ".js" on compiled code. See: microsoft/TypeScript#16577 (comment) All of this results in this weird change. It is the accepted workaround for this issue and until ES6 imports support automatic resolution of extensions, we will keep it.
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 for the great work.
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.
Let's add a changelog entry :)
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.
r+wc
Co-authored-by: Alessio Placitelli <alessio.placitelli@gmail.com>
No description provided.