ds300 / ds300/patch-package

Can `patch-package` be used to modify postinstall script of other npm?

Open
#472 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.2k
Forks
325
PR merge metrics
No merged PRs in 30d

Description

Such as [vscode-ripgrep](https://github.com/microsoft/vscode-ripgrep), It has a postinstall script. In some scenarios, I need to install this package, but I don't want it to execute postinstall script.

![image](https://github.com/ds300/patch-package/assets/11473889/ce391014-3891-41ed-9974-2e7022f59f6c)

Can I modify postinstall script content through patch-package? It seems that it is not possible, because patch-package needs to execute its own postinstall script to modify the dependency content under the node_modules after installing the dependency, but at the same time, the postinstall scripts of other packages are already being executed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.