pnpm patch <pkg>
パッチを適用するパッケージを準備します(Yarnの同様のコマンドに触発されました)。
このコマンドを実行すると、一時ディレクトリにパッケージが展開され、そのディレクトリーでの編集が可能になります。
Once you're done with your changes, run pnpm patch-commit <path> (with <path> being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the patchedDependencies field.
使い方
pnpm patch <pkg name>@<version>
メモ
If you want to change the dependencies of a package, don't use patching to modify the package.json file of the package. For overriding dependencies, use overrides or a package hook.
Options
--edit-dir <dir>
パッチの適用が必要なパッケージは、このディレクトリに展開されます。
--ignore-existing
パッチ適用時に既存のパッチ ファイルを無視します。