Open benbayard opened 6 years ago
Thanks @benbayard!
This can be fixed in babel@7 with the typescript babel plugin.
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 @babel
package, and fall back in case it's not available. This isn't well documented however, sorry for that. I'm hoping to kill babel 6 support soon and at that time it should be more straightforward.
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.