mdx: plugin.resolve
doesn't actually resolve anymore; throws error on build
#33500
Closed
2 tasks done
Labels
status: needs reproduction
This issue needs a simplified reproduction of the bug for further troubleshooting.
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
During the patches for Gatsby v4, it seems that
plugin.resolve
has stopped being resolved to a module in the MDX plugin.https://github.com/gatsbyjs/gatsby/blame/58d30fd9a5d85a31a29a404ce01b74fb5e7dbb7b/packages/gatsby-plugin-mdx/gatsby/create-schema-customization.js#L76-L77
Previous to #33170,
plugin.resolve
used to getrequire
d inside the MDX plugin. If this has been deprecated, it wasn't mentioned anywhere, and should be added to the v4 upgrade guide,I don't think this is intentional, as it also breaks the short-hand plugin syntax where we only give the plugin name as a string, rather than a JS object.
Reproduction Link
https://github.com/davwheat/gatsby-issue-reproduction-1
Steps to Reproduce
gatsbyPlugins
to MDX config{ resolve: 'my-plugin-name' }
or'my-plugin-name'
Expected Result
Site should build with plugins used
Actual Result
Build fails as
plugin.module
is undefined and not resolved fromplugin.resolve
.Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: