From 90d5eb7f2f2c699019aab2d5388ec1e8f3f469d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Fri, 25 Jun 2021 07:58:28 -0400 Subject: [PATCH] fix: sync default_extensions to babel-cli usage (#13508) --- packages/babel-cli/src/babel/options.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/babel-cli/src/babel/options.ts b/packages/babel-cli/src/babel/options.ts index 7253d64b43be..19eb9b20c62c 100644 --- a/packages/babel-cli/src/babel/options.ts +++ b/packages/babel-cli/src/babel/options.ts @@ -1,7 +1,7 @@ import fs from "fs"; import commander from "commander"; -import { version } from "@babel/core"; +import { version, DEFAULT_EXTENSIONS } from "@babel/core"; import glob from "glob"; // Standard Babel input configs. @@ -113,7 +113,9 @@ if (!process.env.BABEL_8_BREAKING) { // "babel" command specific arguments that are not passed to @babel/core. commander.option( "-x, --extensions [extensions]", - "List of extensions to compile when a directory has been the input. [.es6,.js,.es,.jsx,.mjs]", + "List of extensions to compile when a directory has been the input. [" + + DEFAULT_EXTENSIONS.join() + + "]", collect, ); commander.option(