Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/best-shot/babel-preset-evergreen
A babel preset for popular javascript syntaxes
https://github.com/best-shot/babel-preset-evergreen
babel babel-plugin babel-preset core-js ecmascript env es2015 es2016 es2017 es2018 es2019 es2020 es2021 es6 evergreen javascript polyfill syntax
Last synced: about 2 months ago
JSON representation
A babel preset for popular javascript syntaxes
- Host: GitHub
- URL: https://github.com/best-shot/babel-preset-evergreen
- Owner: best-shot
- License: mit
- Created: 2020-05-08T15:00:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-24T16:18:36.000Z (about 2 months ago)
- Last Synced: 2024-11-24T17:23:41.379Z (about 2 months ago)
- Topics: babel, babel-plugin, babel-preset, core-js, ecmascript, env, es2015, es2016, es2017, es2018, es2019, es2020, es2021, es6, evergreen, javascript, polyfill, syntax
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/babel-preset-evergreen
- Size: 1.67 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# babel-preset-evergreen
A [babel] preset for modern javascript syntaxes.
[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge][babel]: https://babel.dev/
[npm-url]: https://www.npmjs.com/package/babel-preset-evergreen
[npm-badge]: https://img.shields.io/npm/v/babel-preset-evergreen.svg?style=flat-square&logo=npm
[github-url]: https://github.com/best-shot/babel-preset-evergreen
[github-badge]: https://img.shields.io/npm/l/babel-preset-evergreen.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/babel-preset-evergreen.svg?style=flat-square&colorB=green&logo=node.jsThis preset can transform:
- ECMAScript 2024 syntax
## Installation
```bash
npm install babel-preset-evergreen --save-dev
```## Usage
```jsonc
// example: babel.config.json
{
"targets": "chrome >= 60",
"presets": [
[
"evergreen",
{
"polyfill": {
"usage": "global"
}
}
]
]
}
```## Options
### polyfill
- type: false | {}
- default: false### polyfill.usage
- type: ['global','pure']
- default: 'global'How `babel` handles polyfills.
References:
### polyfill.include
- type: string[]
- example: ['web.url']### polyfill.exclude
- type: string[]
- example: ['web.url']### polyfill.mini
- type: boolean
- default: false
- description: Use miniprogram presets.## Tips
You might need to pin `core-js@3` when your project dependency tree has `core-js@2`:
```sh
npm install core-js@3
```