From 2d474195e9b173ecbd790a734b1acbf0fdb539af Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Wed, 21 Feb 2024 15:58:31 -0500 Subject: [PATCH] fix(nx-ignore): support plugin object in nx.json (#374) --- packages/nx-ignore/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nx-ignore/src/index.ts b/packages/nx-ignore/src/index.ts index 33aeb52df..8e91c0fce 100644 --- a/packages/nx-ignore/src/index.ts +++ b/packages/nx-ignore/src/index.ts @@ -116,10 +116,12 @@ function logDebug(s: string) { if (isVerbose) console.log(s); } -function findThirdPartyPlugins(root: string) { +function findThirdPartyPlugins(root: string): string[] { const nxJson = require(join(root, 'nx.json')); return ( - nxJson.plugins?.filter((plugin: string) => !plugin.startsWith('.')) ?? [] + nxJson.plugins + ?.map((p: any) => p.plugin ?? p) + ?.filter((plugin: string) => !plugin.startsWith('.')) ?? [] ); }