-
Notifications
You must be signed in to change notification settings - Fork 28
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
Dynamic Imports do not work with TypeScript #37
Comments
Thanks @benbayard!
I don't have much experience with typescript and its toolchain. Would your project build correctly with that setup? In that case I might change the happo typescript plugin so that it uses babel. |
It should work, but it's hard to test because it requires babel@7 and happo currently uses @6. I have high confidence however. And if it doesn't then something is wrong with our project that we should fix any way! |
Happo works with babel 7 as well, in fact it's what I use internally in other (private) happo repositories. For instance, here's one place where we try loading a new |
Btw, do you currently have a workaround for the dynamic import issue? Are you disabling certain happo test files because of it? I'm asking to figure out if this is a blocker or not. |
We are wondering what we will do. Likely we will skip some happo tests. |
Update: We have to upgrade our main app to babel7 to support true dynamic imports. As a result we will probably tackle this in a few weeks. So there's plenty of time here! |
Since we do not use babel w/ the happo-typescript-plugin the solution for #32 does not work. I still get this error:
This can be fixed in babel@7 with the typescript babel plugin. It might also be possible to use ts-loader to parse the module, then use babel to re-parse it.
The text was updated successfully, but these errors were encountered: