Saturday, 29 April 2017

share node.js modules across React apps?

I'm trying out node.js and npm for the first time, to code a React tutorial using the Create React App boilerplate.

The first simple app is working fine.

The file structure looks like this (Windows 7):

file structure of node.js app created with the Create React App boilerplate

My concern is that the node_modules folder is 70mb on file and occupies 120mb on the disk.

It seems that each time I create a new app via Create React App, the same folder is going to get re-created for the new app, and occupy a similar vast amount of storage.

My question is: is there some way to create new apps such that the same modules are not downloaded and don't end up occupying more and more storage, and can instead be shared across apps (not sure if node.js philosophy supports sharing of such modules).



via user1883050

No comments:

Post a Comment