cli: fix react-dom/client check in Jest config

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-10-19 11:26:27 +02:00
parent 6cbe4f999c
commit 28b60adbbe
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
The check for `react-dom/client` in the Jest configuration will now properly always run from the target directory.
+3 -1
View File
@@ -28,7 +28,9 @@ const envOptions = {
};
try {
require.resolve('react-dom/client');
require.resolve('react-dom/client', {
paths: [paths.targetRoot],
});
process.env.HAS_REACT_DOM_CLIENT = true;
} catch {
/* ignored */