diff --git a/doc/languages-frameworks/javascript.section.md b/doc/languages-frameworks/javascript.section.md index 4e031f7f5f34..0ecb59dd3bb6 100644 --- a/doc/languages-frameworks/javascript.section.md +++ b/doc/languages-frameworks/javascript.section.md @@ -406,6 +406,8 @@ In case you are patching `package.json` or `pnpm-lock.yaml`, make sure to pass ` } ``` +If needed, `dontPnpmConfigure = true;` can be used to fully disable `pnpmConfigHook` without manually removing it from inputs. + #### Dealing with `sourceRoot` {#javascript-pnpm-sourceRoot} If the pnpm project is in a subdirectory, you can just define `sourceRoot` or `setSourceRoot` for `fetchPnpmDeps`. diff --git a/pkgs/build-support/node/fetch-pnpm-deps/pnpm-config-hook.sh b/pkgs/build-support/node/fetch-pnpm-deps/pnpm-config-hook.sh index dc732c3822f8..52e5a3dbbd53 100644 --- a/pkgs/build-support/node/fetch-pnpm-deps/pnpm-config-hook.sh +++ b/pkgs/build-support/node/fetch-pnpm-deps/pnpm-config-hook.sh @@ -126,4 +126,6 @@ pnpmConfigHook() { echo "Finished pnpmConfigHook" } -postConfigureHooks+=(pnpmConfigHook) +if [ -z "${dontPnpmConfigure-}" ]; then + postConfigureHooks+=(pnpmConfigHook) +fi