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

Add deprecation warning for useESModules #2441

Merged
merged 1 commit into from Feb 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/plugin-transform-runtime.md
Expand Up @@ -60,7 +60,6 @@ With options (and their defaults):
"corejs": false,
"helpers": true,
"regenerator": true,
"useESModules": false,
"version": "7.0.0-beta.0"
}
]
Expand Down Expand Up @@ -138,8 +137,17 @@ For more information, see [Regenerator aliasing](#regenerator-aliasing).

### `useESModules`

> ⚠️ This option has been deprecated: starting from version `7.13.0`, `@babel/runtime`'s `package.json` uses `"exports"` option to automatically choose between CJS and ESM helpers.

`boolean`, defaults to `false`.

<details>
<summary>History</summary>
| Version | Changes |
| --- | --- |
| `v7.13.0` | This option has been deprecated |
</details>

When enabled, the transform will use helpers that do not get run through
`@babel/plugin-transform-modules-commonjs`. This allows for smaller builds in module
systems like webpack, since it doesn't need to preserve commonjs semantics.
Expand Down