Skip to content

Commit 3e4447b

Browse files
ZackDeRoseclaude
andcommitted
fix(js): check package.json for name when project.json exists but has no name
When a project.json exists but has no name field, now falls back to checking package.json for project name in build and watch deps targets. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent b8f1390 commit 3e4447b

File tree

1 file changed

+3
-1
lines changed
  • packages/js/src/plugins/typescript

1 file changed

+3
-1
lines changed

packages/js/src/plugins/typescript/util.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ export function addBuildAndWatchDepsTargets(
3535
if (existsSync(projectJsonPath)) {
3636
const projectJson = readJsonFile(projectJsonPath);
3737
projectName = projectJson.name;
38-
} else if (existsSync(packageJsonPath)) {
38+
}
39+
40+
if (!projectName && existsSync(packageJsonPath)) {
3941
const packageJson = readJsonFile(packageJsonPath);
4042
projectName = packageJson.nx?.name ?? packageJson.name;
4143
}

0 commit comments

Comments
 (0)