Skip to content

Commit 45c57c5

Browse files
Mark1626SimenB
authored andcommitted
Refractor requireAndTranspileModule to use extenstions from moduleFileExtensions (#8895)
1 parent 95688ac commit 45c57c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/jest-transform/src/ScriptTransformer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ export default class ScriptTransformer {
475475
}
476476
},
477477
{
478-
exts: [path.extname(moduleName)],
478+
exts: this._config.moduleFileExtensions.map(ext => `.${ext}`),
479479
ignoreNodeModules: false,
480480
matcher: filename => {
481481
if (transforming) {

0 commit comments

Comments
 (0)