Is there any way to get packages present in workspace, but excluded from pnpm install
with --filter
from npm registry
#5353
ibezkrovnyi
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's assume we have the following monorepo:
We use
pnpm --filter=[master]
that detectspackageC
was changedAttempt 1: If we try to build only
packageC
, build will fail with info thatpackageB
isn't build.Attempt 2: We can also install with
pnpm --filter=[master]
. If we try to build now, result is the same.Attempt 3: (our current approach) we can fix this by also building all the dependencies (
--filter=[master]...
). ButpackageB
as well aspackageA
didn't change, so this is highly undesirable.Desired solution
Some cli parameter for
pnpm install --filter
that for packages, that ARE in the workspace, but AREN'T included with filtersit will get them from npm registry instead of just always linking.
So, for the above monorepo by running the following command:
we should see that
packageC/node_modules/packageB
is not a symlink topackageB
, but a symlink tonode_modules/.pnpm/[email protected]/node_modules/packageB
(which in turn was downloaded from npm registry)Question
Is there a way in current pnpm or at least a vision how to solve this issue
Beta Was this translation helpful? Give feedback.
All reactions