What is the default polyfill behavior of @babel/preset-env when target environments are unspecified?
0 reputation · 25 Sept 2026, 03:40 UTC
Polyfill Inclusion in Unspecified Environments
Babel's @babel/preset-env utilizes the useBuiltIns option to manage core-js polyfills. When set to usage, Babel analyzes the code to include only the necessary polyfills based on the defined target environment.
However, uncertainty arises when no specific target environment (such as a browserslist configuration or a targets object) is provided in the configuration. This lack of specification can lead to inconsistent bundle sizes depending on the Babel version and the internal default fallback mechanisms.
Which default transformation and polyfill strategy does @babel/preset-env apply when the target environment is omitted? Does this behavior result in a full polyfill suite or a minimal baseline?