Enter async mode only when necessary#79
Conversation
|
This PR seems more simpler than the other one. |
|
the other one does support sync caching though. i could go either way as well. |
|
The problem with the other one, was that the PR had bad timing since I was rewriting a lot of stuff. |
|
How about merging this one then, seeing that it's pretty straightforward, and leaving the other one for when somebody finds time to review it? |
|
@jscheid I think that's a good point, and sorry for taking so long on this matter. |
|
@couto thanks, will do -- switching over from our fork to your develop now. I'll let you know how it goes. |
|
@couto seems to work fine! |
|
I've merged this. You can find it on npm with version 5.3.0 I'm not familiar with enhaced-required, if caching is something that benefits its process, please tell me, so that I can open an issue to rework the first PR. |
Hi,
Ever since babel-loader introduced caching we can't use it anymore together with enhanced-require as that doesn't support async callbacks in loaders.
This change restores enhanced-require compatibility as long as the cacheDirectory option isn't used.
(It would be possible to implement caching synchronously but I suppose there are performance concerns. We don't need caching when using enhanced-require so I left caching to be async.)