Skip to content

Commit

Permalink
Add cjs as a default extension (#11498)
Browse files Browse the repository at this point in the history
  • Loading branch information
perrin4869 committed Feb 21, 2021
1 parent 774c526 commit d1d6ee6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/babel-core/src/index.js
Expand Up @@ -48,6 +48,7 @@ export const DEFAULT_EXTENSIONS = Object.freeze([
".es6",
".es",
".mjs",
".cjs",
]);

// For easier backward-compatibility, provide an API like the one we exposed in Babel 6.
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-register/test/index.js
Expand Up @@ -41,7 +41,7 @@ jest.mock("source-map-support", () => {
});

const defaultOptions = {
exts: [".js", ".jsx", ".es6", ".es", ".mjs"],
exts: [".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"],
ignoreNodeModules: false,
};

Expand Down

0 comments on commit d1d6ee6

Please sign in to comment.