Hi Folks,
Today we will discuss about how to reduce the size of the node_modules folder by removing the repeated, unwanted libs from node_modules folder.
I will be using a tool called ModClean to achieve this, Let's deep dive into the tool installation, usage and how to reduce our project build size.
- Install ModClean with npm i modclean -g
- Navigate to the project folder whether node_modules folder resides in your project and just execute modclean command
- Once the compression is completed check the node_modules folder size it will be reduced.
We can also use different patterns by setting the patterns flag while executing the command.
Further reading : https://github.com/ModClean/modclean
No comments:
Post a Comment