babel-preset-evergreen

0.9.14 • Public • Published

babel-preset-evergreen logo

A babel preset for modern javascript syntaxes.

npm github node

This preset can transform:

  • ECMAScript 2022 syntax

Installation

npm install babel-preset-evergreen --save-dev

Usage

// example: babel.config.json
{
  "targets": "chrome >= 60",
  "presets": [
    [
      "evergreen",
      {
        "polyfill": "global"
      }
    ]
  ]
}

Options

polyfill

  • type: [ false, 'global', 'pure' ]
  • default: false

How babel handles polyfills. pure is an experimental option.

References: https://github.com/babel/babel/issues/10008

Tips

You might need to pin core-js@3 when your project dependency tree has core-js@2:

npm install core-js@3

Package Sidebar

Install

npm i babel-preset-evergreen

Weekly Downloads

207

Version

0.9.14

License

MIT

Unpacked Size

5.25 kB

Total Files

4

Last publish

Collaborators

  • airkro