5 ms·
> As far as I know, these 100+ dev dependencies are installed by default. devDependencies should only be installed if you're developing the React library itsel
by nicoburns 10mo ago
> As far as I know, these 100+ dev dependencies are installed by default.
devDependencies should only be installed if you're developing the React library itself. They won't be installed if you just depend on React.
- ashishb 10mo ago> They won't be installed if you just depend on React. Please correct me if I am wrong, here's my understanding. "npm install installs both dependencies and dev-dependencies unless NODE_ENV is set to production."
- sponnath 10mo agoIt does not recursively install dev-dependencies.
- ashishb 10mo ago> It does not recursively install dev-dependencies. So, these ~100 [direct] dev dependencies are installed by anyone who does `npm install react`, right?
- frio 10mo agoNo. They’re only installed if you git clone react and npm install inside your clone. They are only installed for the topmost package (the one you are working on), npm does not recurse through all your dependencies and install their devDependencies.
- SkiFire13 10mo ago> ~100 [direct] When you do `npm install react` the direct dependency is `react`. All of react's dependencies are indirect.
- rafram 10mo agoRun `npm install react` and see how many packages it says it added. (One.)
- remexre 10mo agoIf you're trying to audit React, don't you either need to audit its build artifacts rather than its source, or audit those dev dependencies too?