From c3b05328bc5d235626d75614e77f4f77495d7027 Mon Sep 17 00:00:00 2001 From: Robert van Steen Date: Sun, 13 Oct 2019 21:11:27 +0200 Subject: [PATCH] Fix #7818 --- packages/react-scripts/config/modules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/config/modules.js b/packages/react-scripts/config/modules.js index 13bd8891e23..38c95b91e44 100644 --- a/packages/react-scripts/config/modules.js +++ b/packages/react-scripts/config/modules.js @@ -101,7 +101,7 @@ function getJestAliases(options = {}) { if (path.relative(paths.appPath, baseUrlResolved) === '') { return { - 'src/(.*)$': '/src/$1', + '^src/(.*)$': '/src/$1', }; } }