A Babel preset targeting modern JavaScript (ES2024) with automatic polyfill management via core-js. Current version 0.11.13 requires @babel/core ^7.29.0 and Node >=20.18.0. Unlike other presets like @babel/preset-env, evergreen focuses on evergreen browsers and offers flexible polyfill strategies (global or pure) with mini-program support. Release cadence is irregular; package is part of the best-shot ecosystem.
npm install babel-preset-evergreenVerified import paths — ran on the pinned version, not inferred.
Configures Babel to transpile modern JS and add global polyfills for Chrome 60+.
Update Node to >=20.18.0 and @babel/core to ^7.29.0.
Use import or dynamic import. For babel config, use string preset name 'evergreen', not require().
Run: npm install core-js@3 --save-dev or pin in package.json.
Choose 'global' for CLIs/libraries, 'pure' for applications to avoid global scope pollution.
Avoid using polyfill.mini unless targeting miniprogram environments.
Rename file to babel.config.mjs or use the string preset name: "presets": ["evergreen"].
Use "evergreen" as the preset name. Babel resolves 'evergreen' to 'babel-preset-evergreen'.
Ensure babel.config.json exists with correct presets array and that Babel is run on the files.