Does npm/yarn install devDependencies by default?

I'm working on private library of react components. I've already setup the whole workflow etc. but I'm not sure about one thing.

In my library I have some packages listed as peerDependencies which have to be peer ones (for example react, cuz only one instance of react can be installed at once, otherwise everything breaks). But if I'd like to setup some tests in my library I need react installed there as devDependency.

So I have to install react as peer and dev in library. And what happens when I publish this package to npm register? devDependencies are excluded here?

Thanks!



Read more here: https://stackoverflow.com/questions/67928964/does-npm-yarn-install-devdependencies-by-default

Content Attribution

This content was originally published by Batiuszka Maroz at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: