How to treeshake node_modules when building a nodejs backend project?

Viewed 61

Could I treeshake node_modules when i build a nodejs backend project?

The node_modules is so big and there are too many small files in it,How can i treeshake it like the frontend do?

Too many small files in node_modules is not used in my project but when i want to deploy offline I must carry them from here to there.

node_modules
-- ramdajs
-- lodashjs
-- ...

enter image description here

How can I do treeshaking with node_modules in an express project.

0 Answers
Related