I have two packages "app" and "lib". "app" depends on "lib" with the workspace protocol as below
{
"dependencies": {
"lib": "workspaces:*"
}
}
I know that when I execute "pnpm -r publish" the version part can be replaced with the real one, for example "lib": "^1.0.0"
.
But in my case, I don't want to publish "app" package, just copy source code and run it something like node app/index.js
. This means I cannot use "pnpm publish".
Is it possible to manually trigger the workspace replacement manually?
OK after dig into the source code of
pnpm
I found a solution. Thanks to the monorepopnpm
provided :)scripts/create-exportable-manifest.ts
, copy the content below.distDir
which should be translated.Hope this helps,