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
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: