A tools which can help you optimize yours node_modules
npm install reduce_node_modules_size -D
yarn add reduce_node_modules_size
You should run this command first!
// in window
get_json --path .\
// in mac
get_json --path ./
when you run this command,you can get node_modules relationship which called relationship.json,in your project root path
// in window
optimize_node_module --path .\
// in mac
optimize_node_module --path ./
when you run this command,terminal will output some message which tell you optimize result.
if system reject optimize,terminal will tell you reason!