Skip to content
2 changes: 1 addition & 1 deletion packages/nx/src/plugins/js/utils/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function getTranspiler(compilerOptions: CompilerOptions) {
}

compilerOptions.lib = ['es2021'];
compilerOptions.module = ts.ModuleKind.CommonJS;
compilerOptions.module = compilerOptions.module || ts.ModuleKind.CommonJS;
compilerOptions.target = ts.ScriptTarget.ES2021;
compilerOptions.inlineSourceMap = true;
compilerOptions.skipLibCheck = true;
Expand Down