How to patch-package --include multiple files of the same package

173 Views Asked by At

Is it possible to patch-package --include multiple files? I have two files under the same package but they're in different paths. What would be the best way to include only the changes from these 2 files?

yarn patch-package <package-name> --include <file1> <file2>
1

There are 1 best solutions below

0
On BEST ANSWER

From the patch-package docs, you can pass a regex to the --include flag. So, including two files can be achieved as follows:

yarn patch-package <package-name> --include (<file1>|<file2>)