-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Labels
Description
💻
- Would you like to work on this feature?
What problem are you trying to solve?
I'm currently profiling the build pipeline of a bigger project and noticed that babel always reads the full config for every file it's transpiling. For this particular project that amounts to about 4s overhead total. The config is static with the exception of the filename property.
If one opts to use a config file there is api.cache, but that's not accessible when calling babel.transform() directly.
Describe the solution you'd like
A way to tell babel to reuse an existing config object instead of reloading it all the time. Since internally transform is composed of loadConfig() and run(), makes me wonder if the ideal way is to expose the transformation.run() function directly.
Describe alternatives you've considered
Not sure
Documentation, Adoption, Migration Strategy
No response
pastelsky