-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-source-contentful] gatsby-plugin-image should be a peerDep #30519
Comments
Hey, thanks for the issue! The docs are correct here, |
Good find, thats outdated. Readme should not contain the install for gatsby-plugin-sharp |
@LekoArts no, we need it as a dependency in the plugin. |
Why is that? @ascorbic documented it differently: https://www.gatsbyjs.com/docs/how-to/plugins-and-themes/adding-gatsby-image-support/#other-considerations
|
It was required when implementing gatsby-plugin-image. Now it is not anymore ¯_(ツ)_/¯ So yeah, can become a peer dep. Checked the code, all requires should check if the plugin is actually installed |
@axe312ger The docs are correct: it should be a peerDependency and a devDependency. |
@ascorbic both? 🤔 |
You can probably skip the devDependency, as you're in the monorepo, but it's for whiel you're developing. |
PR incoming |
Hello!
On this documentation page:
https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-contentful#using-the-new-gatsby-image-plugin
The documentation currently states:
But
gatsby-plugin-image
is already a dependency ofgatsby-source-contentful
, and it works fine without the redundant install.I didn't open a Pull Request because I'm not sure if this is intended or not.
Thanks
The text was updated successfully, but these errors were encountered: