From 26c14f0cc80f40fe9b51e8801afa1473f5fad8ee Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Tue, 12 Sep 2023 11:14:28 -0400 Subject: [PATCH] fix(core): detect dependencies in .cjs and .cts files --- .../explicit-project-dependencies.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.ts b/packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.ts index 9ab63f20437ad..2244ddd3e0d67 100644 --- a/packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.ts +++ b/packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.ts @@ -63,7 +63,16 @@ export function buildExplicitTypeScriptDependencies( const filesToProcess: Record = {}; - const moduleExtensions = ['.ts', '.js', '.tsx', '.jsx', '.mts', '.mjs']; + const moduleExtensions = [ + '.ts', + '.js', + '.tsx', + '.jsx', + '.mts', + '.mjs', + '.cjs', + '.cts', + ]; // TODO: This can be removed when vue is stable if (isVuePluginInstalled()) {