diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index f2f79a2dcc1..6df5bfdd93b 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -44,7 +44,7 @@ module.exports = { settings: { 'import/ignore': [ 'node_modules', - '\\.(json|css|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$', + '\\.(json|css|ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$', ], 'import/extensions': ['.js'], 'import/resolver': { diff --git a/packages/react-scripts/utils/createJestConfig.js b/packages/react-scripts/utils/createJestConfig.js index d271c6420d3..1ef135c0ce7 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: { - '^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 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')],