From 465c7ed84a5e454e28c9bb5dc7644fcfbd35abf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sun, 31 Jan 2021 19:57:20 +0100 Subject: [PATCH] Add deprecation warning for `useESModules` --- docs/plugin-transform-runtime.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/plugin-transform-runtime.md b/docs/plugin-transform-runtime.md index 4dca1633dc..9befc1bcd9 100644 --- a/docs/plugin-transform-runtime.md +++ b/docs/plugin-transform-runtime.md @@ -60,7 +60,6 @@ With options (and their defaults): "corejs": false, "helpers": true, "regenerator": true, - "useESModules": false, "version": "7.0.0-beta.0" } ] @@ -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`. +
+ History +| Version | Changes | +| --- | --- | +| `v7.13.0` | This option has been deprecated | +
+ 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.