From fb829ce2520221e34431fc2cfe1aa5201909f6f8 Mon Sep 17 00:00:00 2001 From: Daniel Pokorny <52500882+pokornyd@users.noreply.github.com> Date: Fri, 17 Jan 2025 12:55:57 +0100 Subject: [PATCH] Update README.md --- README.md | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 2d4e467..add648c 100644 --- a/README.md +++ b/README.md @@ -189,30 +189,6 @@ const MyComponent = ({ props }) => { }; ``` -#### Gatsby.js - -For [Gatsby.js](https://www.gatsbyjs.com), it is necessary to [ignore the RichText browser module by customizing webpack configuration](https://www.gatsbyjs.com/docs/debugging-html-builds/#fixing-third-party-modules) in order to utilize the package. - -```js -// gatsby-node.js - -// https://www.gatsbyjs.com/docs/debugging-html-builds/#fixing-third-party-modules -exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => { - if (stage === "build-html" || stage === "develop-html") { - actions.setWebpackConfig({ - module: { - rules: [ - { - test: /rich-text-browser-parser/, - use: loaders.null(), - }, - ], - }, - }); - } -}; -``` - ### Vue resolution Using `@portabletext/vue` package @@ -276,6 +252,9 @@ Package exports a `traversePortableText` method, which accepts an array of `Port } // logic for modifying other object types... + + // return original block if no modifications required + return block; } const portableText = transformToPortableText(input);