-
Notifications
You must be signed in to change notification settings - Fork 12.8k
ReReview the Issue : Compiled JavaScript import is missing file extension #47188
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
Comments
The reason that System.js and AMD work is because those systems define a set of conventions for how a module is resolved at runtime, and if you omit the module's extension, they'll still perform a There is a lot of discussion on that thread, along with several linked threads that can provide some background - specifically
Unfortunately we can't reiterate the same points over and over. I encourage you to read through these discussions, and I hope you understand that the problem space is not an easy one to tackle for the general case. |
To add to the above: TypeScript in general doesn't touch your import specifiers, regardless of the setting of |
But also Typescript does do a lookup to find the Modules. And it also does that acording to some rules. Why should it not be possible to do this also in the compilation process? |
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
I've created a pull request wich wich solve this for raltive imports, see: I've added a compiler switch:
|
This issue was closed as "works as intended" see: #40878
How can that be?
Why are imports transpiled to workin ones when using "System" or "Amd" as module type. But don't work if I use "ESM" modules.
The text was updated successfully, but these errors were encountered: