Skip to content

Commit

Permalink
fix(nx-ignore): support plugin object in nx.json (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo authored Feb 21, 2024
1 parent 2ed36a4 commit 2d47419
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/nx-ignore/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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('.')) ?? []
);
}

Expand Down

0 comments on commit 2d47419

Please sign in to comment.