-
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
Contentful: respect gatsby-plugin-image defaults and extend tests #33536
Contentful: respect gatsby-plugin-image defaults and extend tests #33536
Conversation
Bump |
caa6428
to
b0ec8ca
Compare
861a735
to
4582656
Compare
b620934
to
424277c
Compare
const { | ||
getPluginOptions, | ||
doMergeDefaults, | ||
} = require(`gatsby-plugin-sharp/plugin-options`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't do this, it breaks PNP support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switched to await import
. This should do the trick?
const { getPluginOptions, doMergeDefaults } = await import( | ||
`gatsby-plugin-sharp/plugin-options` | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still breaks PNP support :D you can't import if it's not a peerdependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wardpeet gatsby-plugin-sharp is a peer dependency already https://github.com/gatsbyjs/gatsby/blob/fix/contentful-respect-gatsby-plugin-image-defaults/packages/gatsby-source-contentful/package.json#L48
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok my mistake
41b59c9
to
13fb9bc
Compare
Reported via #31856 by @njbmartin, rebased version of #32802 based on #33528.
With these changes, we will respect the defaults of gatsby-plugin-image. Additionally, we will have proper tests for all placeholders.