From 758aa045d34297c7f81e80dd2d1e0a798da0c622 Mon Sep 17 00:00:00 2001 From: Jonas <30421456+jonaskuske@users.noreply.github.com> Date: Tue, 6 Sep 2022 15:14:53 +0200 Subject: [PATCH] fix: let preferUnplugged override pkg.conditions fix #4749 --- packages/plugin-pnp/sources/PnpLinker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugin-pnp/sources/PnpLinker.ts b/packages/plugin-pnp/sources/PnpLinker.ts index 1419e69de420..d3459dcbec6d 100644 --- a/packages/plugin-pnp/sources/PnpLinker.ts +++ b/packages/plugin-pnp/sources/PnpLinker.ts @@ -424,12 +424,12 @@ export class PnpInstaller implements Installer { if (FORCED_UNPLUG_PACKAGES.has(pkg.identHash)) return true; - if (pkg.conditions != null) - return true; - if (customPackageData.manifest.preferUnplugged !== null) return customPackageData.manifest.preferUnplugged; + if (pkg.conditions != null) + return true; + if (jsInstallUtils.extractBuildScripts(pkg, customPackageData, dependencyMeta, {configuration: this.opts.project.configuration}).length > 0 || customPackageData.misc.extractHint) return true;