From 889df8e65b105650fdedb21cb92635fabd40e3b6 Mon Sep 17 00:00:00 2001 From: Robert van Steen Date: Mon, 14 Oct 2019 03:59:41 +0200 Subject: [PATCH] Fix absolute paths issue in Jest (#7822) --- 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', }; } }