ts-import-plugin as astTransformer #3411
Unanswered
malykhinvi
asked this question in
Q&A
Replies: 1 comment
-
I had the same problem and configured ts-jest to run using isolatedModules to fix similar issue. Read here about this option here - https://kulshekhar.github.io/ts-jest/docs/getting-started/options/isolatedModules Implemented using my own transformer, sample here - https://github.com/dsmalik/ts-barrel-import-transformer |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all!
In order to workaround slow tests because of barrel imports, I was experimenting with
astTransformers
. I found one plugin - ts-import-plugin, which seems to be solving my issue.In short, I would like to transform this:
to that:
It seems like it does part of the job, because the result after compilation looks like this:
Import declarations have been updated, but the expressions - not. Does anybody know if we need to visit all nodes and update expressions as well, if we replaced import declarations?
Beta Was this translation helpful? Give feedback.
All reactions