diff --git a/packages/react-scripts/utils/createJestConfig.js b/packages/react-scripts/utils/createJestConfig.js index 698bab0d43e..8b514952178 100644 --- a/packages/react-scripts/utils/createJestConfig.js +++ b/packages/react-scripts/utils/createJestConfig.js @@ -24,7 +24,7 @@ module.exports = (resolve, rootDir, isEjecting) => { moduleDirectories: [paths.appSrc, paths.appNodeModules, paths.ownNodeModules], moduleFileExtensions: ['jsx', 'js', 'json'], moduleNameMapper: { - '^.+\\.(?!(js|jsx|css|scss|json)$)[^\\.]+$': resolve('config/jest/FileStub.js'), + '^.+\\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': resolve('config/jest/FileStub.js'), '^.+\\.(css|scss)$': resolve('config/jest/CSSStub.js') }, setupFiles: [resolve('config/polyfills.js')],