From 17767cf769ce32e9cd37d0c316713c6ac4dae989 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Tue, 12 Sep 2023 13:23:18 -0400 Subject: [PATCH] fix(core): detect dependencies in .cjs and .cts files (#19127) --- .../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()) {