Consider @babel/core being bundled to improve CLI startup times. #9575
Labels
area: perf
i: enhancement
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Feature Request
A cold require of
@babel/core
for the first time, can take 400ms->500ms even on a fast machine.This is quite high, especially for smaller projects, as their complete babel compilation time may be less than that.
Idea
Thoughts on mimic'ing yarn, and bundling @babel/core with webpack? My experiments suggest this can lead to a nice boost, with relatively minimal cost.
early POC: https://github.com/stefanpenner/babel-core.bundle
Some issues
It does appear, additional configuration/cleanup will be required to ensure various internals resolve correctly. As doing so via my naive approach appears to break some babel plugins. This may or may not be a show stopper.
For example:
Question
So if this startup perf boost via bundling sounds appealing, I'll gladly explore/debug the above issues further.
Just let me know.
The text was updated successfully, but these errors were encountered: