-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
At Unsplash we use the popular tool patch-package to apply patches to our Node modules after installation. This works in the form of a postinstall script.
However, this buildpack invokes yarn with the --ignore-scripts flag when pruning dev dependencies (since v119), which means patch-package will not run.
I can semi-understand why the buildpack would want to avoid invoking scripts, since the scripts were already run when yarn was invoked the first time, prior to building.
However, in this case we rely on scripts being invoked each time yarn is called, as they significantly modify the contents of node_modules. These modifications are needed for the app to run.
It feels like we need an option to opt-in to running scripts after pruning? Perhaps YARN_PRUNE_SCRIPTS 🤷♂️