pnpm patch-commit <path>

디렉터리에서 패치를 생성하고 저장합니다(Yarn의 유사한 명령어에서 영감을 받음).

This command will compare the changes from path to the package it was supposed to patch, generate a patch file, save the patch file to patchesDir (which can be customized by the --patches-dir option), and add an entry to patchedDependencies.

사용법:

pnpm patch-commit <path>
  • path is the path to a modified copy of the patch target package, usually the directory generated by pnpm patch. It can also be a package name or specifier. If several edit directories match it, the command fails with ERR_PNPM_AMBIGUOUS_PATCH_TARGET.

After recording the patch, pnpm runs an install to apply it.

옵션#

--patches-dir <patchesDir>#

생성된 패치 파일은 이 디렉토리에 저장됩니다. 기본적으로 패치는 프로젝트 루트의 patches 디렉터리에 저장됩니다.