The packages you install with npm install
are required programs for the dependencies you mentioned in packacge.json
. They are there because they are accurate in some part of programs / packages that you will use.
For example, webpack
alone has 22 dependencies , and is an essential piece of code for compiling.
You can always remove packages that you no longer need, but you have to start, to have the features you need and the code can be packaged and go (as light as possible) to the client, then you need those dependencies.
These programs go to the node_modules
folder that you should ignore with a line in .gitignore
because you should not "commit" those folders or copy them. If you take into account that each package has its dependencies, which have their dependencies ... it is a very vicious circle. Hence 100mb in that case.
Try to keep only the packages you need, but of course, there is npm
a lot of useful and interesting ... it is easier to accumulate than to clean.