menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

React

A community of developers, designers and others who love React.js. ⚛️

Channels
Team

how to reduce size of node-modules folder

July 8, 2021 at 5:37am

how to reduce size of node-modules folder

July 8, 2021 at 5:37am
hey devs, when i use create-react-app, the size of node-modules folder rich to 120 mb at first, then by installing packages that will be more, how can i reduce size of this file? all the packages are needed? can i delete it localy? please help me

July 8, 2021 at 7:30am
Hello you never delete the node modules instead you add them in a .gitignore file. Go to the route of your project create a file called .gitignore , inside it write node_modules. This ensures that node_modules are not committed to github but remain to your local storage instead. Hope this helps
Edited

July 9, 2021 at 12:48pm
thanks, but what about deploying on server? totally we must upload it on server and the project will use it, a heavy front end on server is not good