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): Replaces to-style with style-to-object #16062

Merged
merged 4 commits into from
Aug 1, 2019
Merged

fix(gatsby-plugin-mdx): Replaces to-style with style-to-object #16062

merged 4 commits into from
Aug 1, 2019

Conversation

pedrolamas
Copy link
Contributor

Partially fixes #15058

Similar changes are required on Mdx and I've already submitted a PR for them (which once pushed, will require an update of the dependency in Gatsby)

@pedrolamas pedrolamas requested a review from a team as a code owner July 24, 2019 17:35
@pedrolamas pedrolamas changed the title Replaces to-style with postcss in gatsby-plugin-mdx Replaces to-style with style-to-object in gatsby-plugin-mdx Jul 24, 2019
This is no longer required as all values returned from `style-to-object` are strings
@lannonbr lannonbr changed the title Replaces to-style with style-to-object in gatsby-plugin-mdx fix(gatsby-plugin-mdx): Replaces to-style with style-to-object Jul 25, 2019
Copy link
Contributor

@johno johno 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 taking this on and getting in a fix @pedrolamas!

@pedrolamas
Copy link
Contributor Author

My other PR in @mdx-js/mdx to replace to-style with style-to-object has been merged and so this PR really needs to be merged as Gatsby MDX integration is currently broken!

Anyone using the latest @mdx-js/mdx package will see an error like this:

Error in "<root_folder>\node_modules\gatsby-mdx\gatsby-node.js": Cannot find module 'to-style'

This is because Gatsby is trying to use to-style but actually doesn't have it as a dependency anywhere on the project...

I made sure to add the style-to-object an camelcase-css dependencies as you can see here.

@pedrolamas
Copy link
Contributor Author

I hope someone on @gatsbyjs/core is actually reading my message above and will be able to validate the current problem (and that this PR fixes it)

@johno
Copy link
Contributor

johno commented Aug 1, 2019

Hmmm, are you using gatsby-plugin-mdx@1.0.20? It's a new release that just went out that should have the to-style dependency.

@pedrolamas
Copy link
Contributor Author

Good point @johno!

For some weird reason, seems I was using the deprecated gatsby-mdx and not the correct gatsby-plugin-mdx... changing to the correct one fixed the dependency issue!

Given this, should I rebase my changes in this PR to ensure that to-style gets removed on merge?

@johno
Copy link
Contributor

johno commented Aug 1, 2019

I merged in those other changes to your changes already, so we'll probably merge this in and release shortly!

@sidharthachatterjee sidharthachatterjee merged commit a4947ef into gatsbyjs:master Aug 1, 2019
@pedrolamas pedrolamas deleted the pedrolamas/fix-mdx-images branch August 1, 2019 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gatsby-remark-images in MDX doesn't generate base64 placeholders
4 participants