-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional Non-installed Dependencies #1085
Comments
I believe you can already do this with peer deps + peerDependenciesMeta? |
@ljharb Any documentation on that? All I see is info for |
I have created an issue about document the |
For anyone stumbling on this same problem, I've opened an issue here to discuss: npm/rfcs#221 |
@fishcharlie fyi, this was implemented here: npm/arborist@e13ba3b and I presume it will be in the next npm v7 beta, but that's up to the npm team. It relies on using the Example {
"peerDependencies": {
"react": "^16.0.0"
},
"peerDependenciesMeta": {
"react": {
"optional": true
}
} In this case, |
What / Why
When
Where
How
Current Behavior
optionalDependencies
installs automaticallyExpected Behavior
Who
References
The text was updated successfully, but these errors were encountered: