'npm - Patch a package and export it in my own package

I'm trying to patch a package and then export it inside my own npm package (using node 14). I added these in my package.json:

    "postinstall": "patch-package",
    "prepare": "patch-package",

and I see that they are running, but when I consume my package - the package I'm patching is without my changes.

Can I somehow make this package internal to my package so it is not installed in the root node_modules but inside my package's node_modules?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source