Open stuartsan opened 7 years ago
I can also add a case for not throwing when something does not exist, LMK.
@stuartsan thank your for your effort and your offer of helping out with a fix. This would actually be great, as i won't be able to work on it before mid/end of march. Thank you and sorry for the inconvenience. If you want to discuss this issue we can make a skype session.
@stuartsan. Thanks for providing the test. I just had a look at your test. And its not as easy to fix, as we need to know in advance, whether we rewired the module at all. This is the same issue as regarding wildcard in/exports. We therefore decided to tackle all this in a new 2.0.0 branch. We also merged your test into this new branch, and will let you know as soon this is finished.
Hey @speedskater , thanks! Apologies, I dropped the ball, meant to respond here. I had intended to try and fix this myself but poking around in the code I realized it was a major change as well and I was in a bit over my head. Thanks for the update and for all your work on this super valuable plugin, much appreciated.
Going back to this comment: https://github.com/speedskater/babel-plugin-rewire/issues/109#issuecomment-202531181
I'm running into this problem too, I'd like to be able to rewire something that hasn't been used yet without it exploding.
This PR adds a failing test case for the described use case, AFAICT this doesn't yet exist anywhere. If there's anything else I can provide please LMK. Happy to take a crack at a PR to fix as well if that would be useful.