-
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-plugin-mdx: getNodesByType
is not passed to remark plugins
#24400
Labels
type: bug
An issue or pull request relating to a bug in Gatsby
Comments
If this is not intended, I am happy to submit a PR to fix tomorrow if no one else gets to it. Just let me know! |
kamranayub
added a commit
to kamranayub/gatsby
that referenced
this issue
May 26, 2020
laurieontech
pushed a commit
that referenced
this issue
May 27, 2020
johno
pushed a commit
to johno/gatsby
that referenced
this issue
May 28, 2020
axe312ger
pushed a commit
that referenced
this issue
Jun 23, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I am writing my first gatsby-remark plugin and following the documentation it says
Source: https://www.gatsbyjs.org/tutorial/remark-plugin-tutorial/#setting-up-a-plugin
Because of this, I assumed I had access to
getNodesByType
but it actually throws an error:I think it was due to this recent fix by @johno (but it seems like it would have failed previously if someone tried using
getNodes
too).63d091a
Steps to reproduce
Make a plugin and try to destructure
getNodesByType
index.js
Expected result
From the docs, I expected to be able to access all shared helpers including
getNodesByType
. I am trying to get some custom nodes since they contain some data I want to pass to my Remark plugin.Actual result
Due to the spreading happening here:
gatsby/packages/gatsby-plugin-mdx/utils/get-source-plugins-as-remark-plugins.js
Line 63 in 63d091a
The
getNodesByType
is not passed and so it's missing.Environment
Run
gatsby info --clipboard
in your project directory and paste the output here.The text was updated successfully, but these errors were encountered: