Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pokornyd committed Jan 21, 2025
1 parent 690ecae commit fb829ce
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit fb829ce

Please sign in to comment.