asapach / babel-plugin-rewire-exports

Babel plugin for stubbing [ES6, ES2015] module exports
MIT License
66 stars 7 forks source link

Does not work with @babel/preset-flow #39

Open danny-does-stuff opened 1 year ago

danny-does-stuff commented 1 year ago

When using flow (typescript alternative) in my project, "rewire-exports" starts choking on the files with the error

image

This error only happens if I have "rewire-exports" in my plugins. Once I remove it, babel works fine. It also still works when I am using "babel-plugin-rewire". The error only comes up when "rewire-exports" is included. I am happy to help debug this as it is currently pretty blocking for me.

This is also very confusing to me because my setup was working just fine up until today, when I tried to upgrade from jest 26 to jest 27, and then none of my tests worked. There's definitely something strange going on!

I would like to have the flow types stripped before "rewire-exports" runs, but I can't seem to get that to work either. Please let me know if there is any other info I can provide!

asapach commented 1 year ago

Could you please create a minimal repro-case?