10 likes
·
241 reads
3 comments
About the last part of this article, I'm pretty sure that no one can use this package without installing react
, thus it's not "optional" and must not be marked as so.
For example, you could do that if your package would work with both react
and preact
. In this case neither of them are necessary and the developer might have installed only one of them and shouldn't see any warning.
Haha, good point. Actually, the installation procedure is not skipped; npm will install the package in the 'dependencies' section; if you're interested, you can look at 'package-lock.json'.
However, the issue is whether to make a selection at the package level or as an end-developer persona.
IMHO, every non-tightly dependent output dependence should be treated as optional but should make the installation more controlled for end developers.
Haha, good point. Actually, the installation procedure is not skipped; npm will install the package in the 'dependencies' section; if you're interested, you can look at 'package-lock.json'.
However, the issue is whether to make a selection at the package level or as an end-developer persona.
IMHO, every non-tightly dependent output dependence should be treated as optional but should make the installation more controlled for end developers.