diff --git a/packages/jest/src/plugins/plugin.spec.ts b/packages/jest/src/plugins/plugin.spec.ts index 3cf4ae505883f..0bc64d1e99c79 100644 --- a/packages/jest/src/plugins/plugin.spec.ts +++ b/packages/jest/src/plugins/plugin.spec.ts @@ -246,6 +246,9 @@ describe('@nx/jest/plugin', () => { }, "options": { "cwd": "proj", + "env": { + "TS_NODE_COMPILER_OPTIONS": "{"moduleResolution":"node10"}", + }, }, "outputs": [ "{workspaceRoot}/coverage", diff --git a/packages/jest/src/plugins/plugin.ts b/packages/jest/src/plugins/plugin.ts index b761c25233203..f624760f27358 100644 --- a/packages/jest/src/plugins/plugin.ts +++ b/packages/jest/src/plugins/plugin.ts @@ -407,6 +407,9 @@ async function buildJestTargets( outputs, options: { cwd: projectRoot, + env: { + TS_NODE_COMPILER_OPTIONS: '{"moduleResolution":"node10"}', + }, }, metadata: { technologies: ['jest'],