From 8ece6f8ae8bb8c3842cdae6976657186c71fb192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 10 Jan 2020 22:03:50 +0100 Subject: [PATCH] Review --- docs/config-files.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/config-files.md b/docs/config-files.md index 6d07d10feb..2141a00ef3 100644 --- a/docs/config-files.md +++ b/docs/config-files.md @@ -111,9 +111,7 @@ Babel can be configured using any file extension natively supported by Node.js: - `babel.config.cjs` and `.babelrc.cjs` allow you to define your configuration as CommonJS, using `module.exports`. -- `babel.config.mjs` and `.babelrc.mjs` use native ECMAScript modules. They are only supported by - Node.js 13.2 or newer, and might work in older versions when passing `--experimental-modules` flag - to Node.js. +- `babel.config.mjs` and `.babelrc.mjs` use native ECMAScript modules. They are supported by Node.js 13.2+ (or older versions via the `--experimental-modules` flag). Please remember that native ECMAScript modules are asynchronous (that's why `import()` always returns a promise!): for this reason, `.mjs` config files will throw when calling Babel synchronously.