-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Right now in npm or yarn it's impossible to ignore packages.
This makes it very difficult to package small node_modules folder.
Let me explain:
In my apps i use many packages, some for which i need to keep optionalDependencies like noble. Some i dont want and which makes the node_modules folder a lot bigger, like log4js optional dependencies.
The consequence of that is that i can't use --ignore-optional.
So for example if i want, after a yarn install --flat --prod cleanup and remove log4js optionalDependencies, i simply cant! I would need to get the dependency tree for all the optional modules, make sure there are not used by anyone else, and then remove the folders manualy.
The best solution, even if not perfect, would be to be able in the package.json to add "ignored" packages. Those would be ignored in yarn install and thus would not alter the dependency tree.
I would then simply have to add all log4js optional dependencies in my ignored section.
Would that be possible?