Support pnpm’s “syncInjectedDepsAfterScripts” config #33410
onlywei
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I’ve got a monorepo that is using Nx and pnpm workspaces. I want to use “pnpm deploy” , which requires me to turn on the “injectWorkspacePackages” setting: https://pnpm.io/settings#injectworkspacepackages
What I’ve noticed with this setting is that the injected hard-links in my node_modules don’t get updates when my local packages are built. Therefore, from a clean reset none of my packages have any “dist” folders. When I try to build them, the dist folders they create do not automatically get re-injected into the node_modules’ hard links.
pnpm’s solution for this is the “syncInjectedDepsAfterScripts” config: https://pnpm.io/settings#syncinjecteddepsafterscripts
This works great if I build my packages with pnpm itself:
However I don’t get any individual package caching with that. Unfortunately running my build script via Nx and
dependsOnfails to trigger the “syncInjectedDepsAfterScripts” process.Beta Was this translation helpful? Give feedback.
All reactions