Theme-ui: Issue with MDXRenderer

Created on 26 Jun 2019  路  3Comments  路  Source: system-ui/theme-ui

Hey @johno, theme-ui is looking awesome!

I'm getting a following error after importing MDXRenderer:

Failed to compile

./node_modules/gatsby-mdx/context.js 11:2
Module parse failed: Unexpected token (11:2)
You may need an appropriate loader to handle this file type.
| 
| export const MDXScopeProvider = ({ __mdxScope, children }) => (
>   <GatsbyMDXScopeContext.Provider value={__mdxScope}>
|     {children}
|   </GatsbyMDXScopeContext.Provider>

Do you think it could be because of ThemeProvider? It works fine for mdx in /pages, but I'd like to render eg. articles which is when MDXRenderer would come handy.

Example repo

馃檹

bug

All 3 comments

Thanks for the reproduction! I'll look into it sometime this week.

importing MDXRenderer from gatsby-plugin-mdx instead of gatsby-mdx fixed this for me. 馃帀

Nice! Yeah, in your repo you can remove gatsby-mdx and use gatsby-plugin-mdx. It will be officially released soon anyway 馃槃. Going to go ahead and close this since it's working for you.

Thanks for opening up an issue! Let us know if you encounter anything else 鉂わ笍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moshemo picture moshemo  路  3Comments

mxstbr picture mxstbr  路  3Comments

folz picture folz  路  3Comments

kiastorm-zz picture kiastorm-zz  路  4Comments

LeunensMichiel picture LeunensMichiel  路  3Comments