What does api.cache(true) exactly does in babel.config.js? #12080
-
Hi Team, It would be really helpful, If you could help me understand the exact purpose of the api.cache(true) inside What I have understood from the documentation is that to inhibit re-execution of the function which is exported from If the user, sets this Did I understood this correctly, or am I missing something? Appreciate your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
api.cache(true)
allows Babel to avoid re-evaluating your configuration factory function, giving a small speedup. Not only configs, but also plugins and presets can configure their own caching mechanisms to avoid being re-instantiated every time.