diff --git a/packages/nx/src/plugins/js/utils/register.ts b/packages/nx/src/plugins/js/utils/register.ts index 49094899b5dde2..6377452f9d2393 100644 --- a/packages/nx/src/plugins/js/utils/register.ts +++ b/packages/nx/src/plugins/js/utils/register.ts @@ -112,6 +112,7 @@ export function getTranspiler(compilerOptions: CompilerOptions) { compilerOptions.lib = ['es2021']; compilerOptions.module = ts.ModuleKind.CommonJS; + compilerOptions.moduleResolution = ts.ModuleResolutionKind.Node10; compilerOptions.target = ts.ScriptTarget.ES2021; compilerOptions.inlineSourceMap = true; compilerOptions.skipLibCheck = true;