Fix missing PnP linkers if node_modules exists

This can happen because some tools write to `node_modules/.cache` as a
convention.
This commit is contained in:
Stéphan Kochen
2023-11-01 13:33:26 +01:00
parent e1c75c301a
commit f5c9f25c94
2 changed files with 12 additions and 11 deletions
+2
View File
@@ -325,6 +325,8 @@ export default async (
ISOLATED: isolatedCode.join("\n"),
ISOLATED_INTEGRATION: indent(" ", isolatedIntegration.join("\n")),
NEED_ISOLATED_BUILD_SUPPRORT: isolatedIntegration.length > 0,
USES_PNP_LINKER: configuration.get("nodeLinker") === "pnp",
USES_NM_LINKER: configuration.get("nodeLinker") === "node-modules",
});
await xfs.writeFilePromise(nixExprPath, projectExpr);