You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new babel.config.js allows (seemingly requires) you to set up caching. I think the documentation on caching is a little unclear in a couple of spots:
Any time the using callback returns a value other than the one that was expected...
What is meant by "expected?"
Also, the .invalidate explanation seems to have been copied from the .using section but not updated. I would like to rewrite it, but I'm a bit confused about how invalidate works as well... does it invalidate the cache if it encounters a value different from the immediately previous value? Is it based on a boolean? Will it only invalidate a value that had been used with .using? In that case, how do you use them together?
Finally, the suggestion to use a boolean with .using raises a question -- this will create a cache for values of true and false. Thus it seems like once you have used both these values there is no way to invalidate the cache (without adding a .invalidate or something). I think this should either be specified if my understanding is correct or clarified if it's incorrect.
I think that the error output if you don't set up caching for babel is clearer, at least for .using:
If this function returns a value different from a previously-encountered value...
The text was updated successfully, but these errors were encountered:
The new babel.config.js allows (seemingly requires) you to set up caching. I think the documentation on caching is a little unclear in a couple of spots:
What is meant by "expected?"
Also, the
.invalidate
explanation seems to have been copied from the.using
section but not updated. I would like to rewrite it, but I'm a bit confused about howinvalidate
works as well... does it invalidate the cache if it encounters a value different from the immediately previous value? Is it based on a boolean? Will it only invalidate a value that had been used with.using
? In that case, how do you use them together?Finally, the suggestion to use a boolean with
.using
raises a question -- this will create a cache for values oftrue
andfalse
. Thus it seems like once you have used both these values there is no way to invalidate the cache (without adding a.invalidate
or something). I think this should either be specified if my understanding is correct or clarified if it's incorrect.I think that the error output if you don't set up caching for
babel
is clearer, at least for.using
:The text was updated successfully, but these errors were encountered: