Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove modern envs #119

Merged
merged 5 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 7 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,16 @@ You can set up Babel transpilation in [several ways](http://babeljs.io/docs/setu

The preset can be configured using several options. Note that some options' defaults depend on the [Babel environment](https://babeljs.io/docs/en/options#envname), which may be one of the following:

| Environment | Purpose |
| -------------------- | -------------------------------------------------------------------- |
| `development` | Transpiling an app for development. |
| `production` | Transpiling an app for production. |
| `development-modern` | Transpiling an app for development with only modern browser support. |
| `production-modern` | Transpiling an app for production with only modern browser support. |
| `test` | Transpiling an app or library to run in the current version of Node. |
| `cjs` | Transpiling a library for distribution as CJS. |
| `esm` | Transpiling a library for distribution as ESM. |
| Environment | Purpose |
| ------------- | -------------------------------------------------------------------- |
| `development` | Transpiling an app for development. |
| `production` | Transpiling an app for production. |
| `test` | Transpiling an app or library to run in the current version of Node. |
| `cjs` | Transpiling a library for distribution as CJS. |
| `esm` | Transpiling a library for distribution as ESM. |

The present extends [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env), and forwards all additional options to that preset.

Browser support is provided by `@babel/preset-env`'s [`browserslist` integration](https://babeljs.io/docs/en/babel-preset-env#browserslist-integration), where browser support is declared in a `.browserslistrc` file which can either contain a single set of browser queries or [multiple named groups of queries](https://github.com/browserslist/browserslist#configuring-for-different-environments). This preset's `development` and `production` envs will use the default (`production`) group while the `development-modern` and `production-modern` envs will use a `modern` group. Be sure to specify these groups if using the corresponding environments.

### `browserslistEnv`

`string` | `undefined`<br />
Default: `modern` for `development-modern` and `production-modern` envs, `undefined` otherwise

The Browserslist environment to use. Forwarded to [the corresponding option in `@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#browserslistenv).

### `emotion`

`false` | [`options`](https://emotion.sh/docs/@emotion/babel-preset-css-prop#options)<br />
Expand Down
Loading