Skip to content
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-mdx): fix html field resolver to work with webpack@5 #30158

Merged
merged 2 commits into from Mar 10, 2021

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Mar 10, 2021

Description

html field in gatsby-plugin-mdx was not working due its usage of webpack and not migrating it to work with webpack@5:

This changes how it currently work to straight import produced file (similar as we do in core for ssr rendering) and skip messing with compilation object to grab source and then materialize/evaluate it (and using additional webpack plugin just for that)

Related Issues

Fixes #29983

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 10, 2021
@pieh pieh added topic: MDX topic: webpack/babel Webpack or babel and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 10, 2021
Copy link
Contributor

@laurieontech laurieontech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an e2e test that uses the html field so we can make sure this doesn't break again?

@pieh
Copy link
Contributor Author

pieh commented Mar 10, 2021

Can we add an e2e test that uses the html field so we can make sure this doesn't break again?

None of our e2e tests use mdx so I would need to do full setup or add it to e2e/production-runtime one, but will do

@laurieontech
Copy link
Contributor

@pieh we have two that do. mdx and mdx-less-babel

Copy link
Contributor

@laurieontech laurieontech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding that!

@pieh pieh merged commit 0a6c6eb into master Mar 10, 2021
@pieh pieh deleted the fix/v3-mdx-html-for-feed branch March 10, 2021 15:10
@pieh pieh added this to To cherry-pick in V3 Release Hotfixes via automation Mar 10, 2021
vladar pushed a commit that referenced this pull request Mar 10, 2021
@vladar vladar moved this from To cherry-pick to Backport PR opened in V3 Release Hotfixes Mar 10, 2021
vladar added a commit that referenced this pull request Mar 10, 2021
#30158) (#30172)

Cherry-picked from 0a6c6eb

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
@vladar vladar moved this from Backport PR opened to Backported in V3 Release Hotfixes Mar 10, 2021
@vladar
Copy link
Contributor

vladar commented Mar 10, 2021

Published in gatsby-plugin-mdx@2.0.1

This was referenced Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: webpack/babel Webpack or babel
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

gatsby-plugin-feed stopped working with gatsby-plugin-mdx in Gatsby v3
3 participants