Skip to content

Commit 7430238

Browse files
authored
fix(core): resolve package.json for @nx/js to improve plugin detection (#31770)
This PR updates the package.json inferred target to resolve package.json instead of the entry file.
1 parent ad14f2f commit 7430238

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nx/src/utils/package-json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export function readTargetsFromPackageJson(
239239
function hasNxJsPlugin(projectRoot: string, workspaceRoot: string) {
240240
try {
241241
// nx-ignore-next-line
242-
require.resolve('@nx/js', {
242+
require.resolve('@nx/js/package.json', {
243243
paths: [projectRoot, ...getNxRequirePaths(workspaceRoot), __dirname],
244244
});
245245
return true;

0 commit comments

Comments
 (0)