Merge pull request #27262 from backstage/rugvip/dom-client-check

cli: fix react-dom/client check in Jest config
This commit is contained in:
Patrik Oldsberg
2024-10-19 11:48:54 +02:00
committed by GitHub
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 */