-
-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: reducing size of node_modules with postinstall script #1021
Conversation
It can be dangerous to change other package. It can be re-used by somebody else. |
Yeap, but these folders are really useless for node environment. In my opinion, there are no other ways to reduce node_modules of lint-staged |
May I ask first why is this such a big issue? 23 MB vs 14 MB doesn't look like a big deal to me in the first place. What problem are you trying to solve here? |
I only try to reduce size of node_modules with small steps. Step by step. |
Maybe @ai can explain what’s the goal here and why this is important? |
The problem is that https://packagephobia.com/result?p=lint-staged But applying patch to subdependencies looks like too dangerous way. It is better to replace them to smallest analogs. |
@ai |
Yeap. |
This PR #1003 has some improvements regarding this, since |
I think this PR shouldn't be merged because it seems very dangerous to remove local node_modules. Let's try to cut down on dependency size by actually updating/replacing them rather than things like this! Closing the PR. |
Looks like we can reduce the size of node_modules by ~40 percent
All we need is to delete necessary folders:
Without postinstall script we have
With simple postinstall command, we have
cc @ai