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

fix: sync default_extensions to babel-cli usage #13508

Merged
merged 1 commit into from Jun 25, 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
6 changes: 4 additions & 2 deletions 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.
Expand Down Expand Up @@ -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() +
existentialism marked this conversation as resolved.
Show resolved Hide resolved
"]",
collect,
);
commander.option(
Expand Down