Closed cliffkoh closed 5 years ago
BTW the reason I am hitting this code path is because:
In this case, I'm blocked by this pattern here..
One idea to get around this is to refactor the constructor to allow passing in IORedis and if passed in, don't do this eval/require..
I like your idea and it can be a quick workaround until someone suggests a better solution. It's disappointing that the workaround to make things work in one environment breaks it for other people. I'll implement and release it tomorrow morning.
Edit: Another idea could be to look for the presence of the __webpack__require__
function. More automatic, but fragile.
Thanks Simon!
I've released v2.19.3. It allows you to pass the { Redis: your_ioredis_module }
option. Please let me know how it goes!
Thank you!
I noticed that TypeScript types were not updated so created a PR for it...
Sorry about that! That's what happens when I try to rush things. I've just released v2.19.4.
No worries, appreciate how responsive you have been :)
I'm running into a problem now where because of the obfuscation over here: https://github.com/SGrondin/bottleneck/blob/63742224c8dd345a4d6752ac87ad1c597329edfd/src/IORedisConnection.coffee#L15
This require does not get properly replaced with a
__webpack__require__
import, resulting in a failure to resolve "ioredis" at runtime...Any advice?