Open Prichmondo opened 3 years ago
Hi @Prichmondo! Please make sure to go through our change log when upgrading to a new major version to be aware of breaking changes. Specifically this entry could be of interest to you.
For documentation on renderRichText()
please see documentation on rich-text-react-renderer which is also applicable to gatsby-source-contentful/rich-text
as stated in this Contentful / Gatsby guide
I still have an issue with gastby build though: renderRichText fails in rendering embedded resources:
Did you already check out above documentation to properly render embedded resources? Would you mind pasting your code or perhaps even a codesandbox example?
I have recently updated gatsby-source-contentful to the version 5. In order to manage rich-text field render I replaced the previous function with the new renderRichText. I had to fix around all the graphql queries to replace json field with the raw, including declaration for all the embedded resources.
In this way I fixed dev mode, which is working fine now.
I still have an issue with gastby build though: renderRichText fails in rendering embedded resources:
` 257 | } 258 | // dates
WebpackError: TypeError: Right-hand side of 'instanceof' is not an object
fast-copy.esm.js:259 [ding-rocket]/[fast-copy]/dist/fast-copy.esm.js:259:1
fast-copy.esm.js:329 [ding-rocket]/[fast-copy]/dist/fast-copy.esm.js:329:1
index.js:129 [ding-rocket]/[contentful-resolve-response]/dist/esm/index.js:129:27
rich-text.js:50 [ding-rocket]/[gatsby-source-contentful]/rich-text.js:50:60
AGAIN, I don't get this issue in dev-mode