-
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
fix(gatsby-plugin-image): Use bare GATSBY___IMAGE global #30713
Conversation
Thank you for the feedback! I'll admit that my fix was rather crude, and I'm glad that this PR solves the underlying issue! Thanks again! |
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.
Make sense, thanks!
packages/gatsby-plugin-image/src/components/__tests__/gatsby-image.browser.tsx
Show resolved
Hide resolved
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.
🌮
* fix(gatsby-plugin-image): Use bare GATSBY___IMAGE global * Fix check * Fix test * Use helper * Remove unused type (cherry picked from commit a5869e3)
…0734) * fix(gatsby-plugin-image): Use bare GATSBY___IMAGE global * Fix check * Fix test * Use helper * Remove unused type (cherry picked from commit a5869e3) Co-authored-by: Matt Kane <[email protected]>
Published in |
The image plugin currently defines
global.GATSBY___IMAGE
to detect when the plugin is installed, which causes problems with thrid-party plugins. This changes it to just create a bare globalGATSBY___IMAGE
, and updates types to match.Thanks @kelvindecosta for his PR, but there were some issues in the approach there so I have opened this instead.
Fixes #30093, fixes #30094, fixes #30456, fixes #30609