Skip to content

Commit

Permalink
Add deprecation warning for useESModules (#2441)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Feb 22, 2021
1 parent e475dc6 commit 291e8a7
Showing 1 changed file with 9 additions and 1 deletion.
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

0 comments on commit 291e8a7

Please sign in to comment.