Skip to content

What does api.cache(true) exactly does in babel.config.js? #12080

Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JLHwung
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants