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(analyzer): ignore type-only imports & exports #380
Conversation
Thanks for working on this, this will be nice. |
Does this fix this issue (i.e. this comment in that issue)? |
Yes, I think this would fix that. |
Bump. 🙂 |
2cdcaa5
to
0403341
Compare
If the TS syntax plugin is not loaded, the following scenarios fail, as the `import type` syntax is not understood: - `lts-own` - `release-own` - `beta-own` - `canary-own`
Alright, sorry that I kept this idling for so long, but I had no clue and time to dig into, why the 4 The issue was that all scenarios, except for I've added I've also rebased the PR and it's all working fine now. ✅ Please let me know, whether I should add more tests, or whether I should change the TS syntax opt-in. |
Looks great, thanks. |
Backports #380. * fix(analyzer): ignore type-only imports & exports * test(analyzer): type-only imports ignored in created file * test(analyzer): add `@babel/plugin-syntax-typescript` If the TS syntax plugin is not loaded, the following scenarios fail, as the `import type` syntax is not understood: - `lts-own` - `release-own` - `beta-own` - `canary-own` * test(analyzer): conditional `babel@7` tests The `import type` syntax is only available with `babel@7`, but `ember-auto-import@1.x` only tests for `babel@6`. This commit makes the `analyzer` test module run twice: once for `babel@6` an once for `babel@7`, where the latter has a different babel plugin configuration and runs the addition `import type` test.
Prevents type-only imports / exports from ending up in the final bundle.