diff --git a/packages/js/src/utils/package-json/update-package-json.ts b/packages/js/src/utils/package-json/update-package-json.ts index a516cef36d456..bf87cdfff1286 100644 --- a/packages/js/src/utils/package-json/update-package-json.ts +++ b/packages/js/src/utils/package-json/update-package-json.ts @@ -144,8 +144,13 @@ function addMissingDependencies( packageJson[propType][packageName] = version; } else { const packageName = entry.name; + if (!!workspacePackageJson.devDependencies?.[packageName]) { + return; + } + if ( !packageJson.dependencies?.[packageName] && + !packageJson.devDependencies?.[packageName] && !packageJson.peerDependencies?.[packageName] ) { const outputs = getOutputsForTargetAndConfiguration(