-
-
Notifications
You must be signed in to change notification settings - Fork 28
Importing a mix of types and values in an import using a custom path results in undefined imports in result JavaScript #48
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
Thank you for the bug report, good spot. |
Hi @booninite, I've made a PR #53 that should fix this issue, I'll probably merge it and publish it to npm later today. @all-contributors add @booninite for bug. |
I've put up a pull request to add @booninite! 🎉 |
@danielpza I wasn't able to pick up the fix today, I should be able to try it out tomorrow and can let you know 👍 |
It doesn't seem to be working when I try it. Sample output & configuration is below:
|
@danielpza Here is a with minimal code which reproduces the issue: https://github.com/DmitryKoterov/typescript-transform-paths-bug - could you please take a look? Those excess import symbols don't allow to use es6 modules since node complains on an attempt to import an undefined symbol: |
* Multiple Issue Fixes - Allow more than one path routing (fixes #60) - Remove implicit extensions from output (fixes #24) - Properly implemented isTypeOnly (fixes #48) - Corrected errors in tests due to TS changing logic for type only star exports - Bonus: Made package zero-dependency * Removed accidental dependency
Given:
file1.ts:
file2.ts:
When the code is compiled, the Javascript import will read something like this:
file2.js:
but
Foo
will be undefined and cause errors.The text was updated successfully, but these errors were encountered: